You are not logged in.

#1 2011-06-07 23:09:44

firyice
Member
From: NJ
Registered: 2011-05-27
Posts: 15

Why do I need consolekit or dbus?

I currently run DWM as my window manager, and the last line of my .xinitrc is:

exec ~/scripts/startdwm

I see a lot of others have something to the effect of:

exec ck-launch-session dbus-launch --sh-syntax --exit-with-session ~/.bin/startdwm

What is the purpose of this?  What am I missing out on by not starting with consolekit or dbus?  What is the best practice?

Offline

#2 2011-06-07 23:19:35

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: Why do I need consolekit or dbus?

firyice wrote:

What is the purpose of this?  What am I missing out on by not starting with consolekit or dbus?  What is the best practice?

What did google tell you?


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2011-06-07 23:19:46

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Why do I need consolekit or dbus?

There are wiki pages on both of these: please research topics before asking questions here:

Closing.

Edit: saved by a kinder mod...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2011-06-07 23:20:47

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Why do I need consolekit or dbus?

firyice wrote:

What is the purpose of this?

https://bbs.archlinux.org/viewtopic.php?id=120228
litemotiv wants to mount stuff as a user in pcmanfm

Offline

#5 2011-06-08 00:00:26

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: Why do I need consolekit or dbus?

@firyice, not everybody needs that. I, for example, don't and everything works just brilliant. So if there's nothing you're missing without these entries, delete them.

Offline

#6 2011-06-08 03:41:54

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Why do I need consolekit or dbus?

I don't have consolekit installed either and I don't have any problems. There are some (all?) DEs which install it as a dependency and make use of it. But if you use minimal systems with a WM you don't necessarily need consolekit.

Mounting and automounting of external drives is one of the things that consolekit can do but there are alternatives as well. I do my automounting using udisks and devmon and it works pretty well.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#7 2011-06-08 08:36:27

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: Why do I need consolekit or dbus?

I do automounting with an udev rule /etc/udev/rules.d/11-media-by-label-auto-mount.rules, works perfectly fine. To umount the drives I have to be root, but I always have a root terminal open, so that's really fine, at least for me.

Last edited by Army (2011-06-08 08:37:24)

Offline

#8 2011-06-08 09:22:41

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Why do I need consolekit or dbus?

Inxsible wrote:

Mounting and automounting of external drives is one of the things that consolekit can do but there are alternatives as well. I do my automounting using udisks and devmon and it works pretty well.

Afaik devmon also makes use of consolekit to propagate permissions, comparably to what pcmanfm does (the latter also uses udisks). The main difference seems to be that devmon runs permanently as a looping bash-script in the background, which could be less desirable for some.

I suspect that devmon might face the same problems when initiated through autologin, like in the scenario karol linked to above..


ᶘ ᵒᴥᵒᶅ

Offline

#9 2011-06-08 15:52:20

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Why do I need consolekit or dbus?

I don't think it uses consolekit as I don't have it installed, but I will confirm later tonight.

I use autologin via inittab as well and then start devmon in .xinitrc (or i3config -- i forget), but I can use my external drives as a regular user.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#10 2011-06-08 18:26:34

firyice
Member
From: NJ
Registered: 2011-05-27
Posts: 15

Re: Why do I need consolekit or dbus?

jasonwryan wrote:

There are wiki pages on both of these: please research topics before asking questions here:

I did some research before coming here. My initial post was not very descriptive, and for that I apologize.  Let me try to explain myself better.

In the quest to learn more about the dark corners of my Arch Linux machine, I'm picking out components and learning more about them. Currently in the hot-seat are dbus & consolekit.  I'll break down my experience so far with each of them separately, [hopefully] for the benefit of clarity.

dbus
As do most archers, I started out with the Beginner's guide. Here is what it says about dbus:

Arch Wiki wrote:

Note: dbus is likely required for many of your applications to work properly, if you know you do not need it, skip this section

In other words, "just install dbus 'cause you probably need it".  I had no idea whether or not I needed it, so I just installed it, as was recommended. However, I'd like to note that this seems to deviate with The Arch Way. The arch way stresses simplicity and code correctness over convenience, so to ask the user to install something without explaining why seems out of place. The more typical approach throughout the wiki is to explain why, like "install mesa for 3D support" or "install alsa-mixer to control sound".

Next, looking at the dbus Arch Wiki entry, it's clear that dbus is a system for easy inter-process communication, but I still have no idea why almost everyone needs to install it.  Won't apps requiring dbus for IPC have dependencies on dbus, and then install and use dbus like any other dependency? If not, don't I need to know what common applications use dbus, as well as how and why they do so?  This is where my confusion lies. 

ConsoleKit
The Arch Wiki ConsoleKit entry explains:

Arch Wiki wrote:

ConsoleKit is a framework for managing user sessions, and permissions.

What is not done already that ConsoleKit solves with its session management?  What does ConsoleKit do with permissions that isn't handled by either the Linux kernel or sudo/su/chmod/etc...?

The ConsoleKit Official documentation comically avoids answering this:

ConsoleKit Documentation wrote:
Defining the Problem

To be written.

The Arch Wiki ConsoleKit entry further explains:

Arch Wiki wrote:

Some of the most common usages of ConsoleKit is allowing non-root users to mount removable media, and suspending/shutting down the computer through common desktop applications (ie: thunar, nautilus, the gnome shutdown menu, etc).

Why is this better than just using sudo for mounting media and shutting down / restarting?  If I can do some cool stuff with ConsoleKit managing my X sessions, sign me up, but tell me what I can do & where to start. 

If there is nothing new that ConsoleKit does, and some apps just arbitrarily decided to use it as opposed to more common components for certain functionality, then how do I know that before using those apps? If it's just guess and check that's fine, but I feel like I'm missing something here.

Also, is there a best-practice way to launch several apps under consoleKit, as opposed to this "dirty workaround":

Arch Wiki wrote:

A dirty workaround is to have the entire session started by a second script (don't forget dbus-launch, it's likely you need it too).

And again with the "you probably need dbus" without explaining why. 



My poorly-thought out original post begged to be dismissed with a "google it". Hopefully I have better explained myself, and someone can point me in the right direction.  If I've just stupidly missed something basic (most likely the case, I'm somewhat new to all of this), have mercy on me and kindly point me in the right direction.

Thanks!

Offline

#11 2011-06-08 18:42:08

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Why do I need consolekit or dbus?

firyice wrote:

Won't apps requiring dbus for IPC have dependencies on dbus, and then install and use dbus like any other dependency?

Yes they should, and if they don't it should be added to them. I believe this wiki section should be improved.

ConsoleKit
The Arch Wiki ConsoleKit entry explains:

Arch Wiki wrote:

ConsoleKit is a framework for managing user sessions, and permissions.

What is not done already that ConsoleKit solves with its session management?  What does ConsoleKit do with permissions that isn't handled by either the Linux kernel or sudo/su/chmod/etc...?

Consolekit allows regular users to do things that would normally be done as root (such as mounting). So if you don't intend to use that functionality yourself and just sudo instead, you won't need consolekit.

edit: p.s., the reason why the words 'probably' and 'likely' are often used in relation to dbus and consolekit, is because most of us here are not sure either how this all integrates. The consolekit and dbus integration in freedesktop is still somewhat under development and it changes sometimes too, so it's behaviour is not 100% documented or predictable (as far as i know).

Last edited by litemotiv (2011-06-08 18:49:57)


ᶘ ᵒᴥᵒᶅ

Offline

#12 2011-06-09 03:59:36

firyice
Member
From: NJ
Registered: 2011-05-27
Posts: 15

Re: Why do I need consolekit or dbus?

litemotiv wrote:

Yes they should, and if they don't it should be added to them. I believe this wiki section should be improved.

I'll bring this up in the wiki sub-forum.  I'm somewhat new in these forums, but I assume that's the etiquette here?

litemotiv wrote:

Consolekit allows regular users to do things that would normally be done as root (such as mounting). So if you don't intend to use that functionality yourself and just sudo instead, you won't need consolekit.

Then in general, from what i understand, DE users need to add the dbus daemon, and consolekit is taken care of for them by the DE.  Everyone else should really only use dbus or consolekit if they have a specific app that depends on them / gets errors without them?

litemotiv wrote:

edit: p.s., the reason why the words 'probably' and 'likely' are often used in relation to dbus and consolekit, is because most of us here are not sure either how this all integrates. The consolekit and dbus integration in freedesktop is still somewhat under development and it changes sometimes too, so it's behaviour is not 100% documented or predictable (as far as i know).

This is probably what I needed to hear the most.  Being new, I thought I was just the odd one out in not understanding consolekit and dbus integration. Still, if anyone knows anything more than me that would further clear up my understanding of this, I'd be very grateful

Offline

#13 2011-06-09 16:42:05

twl
Member
Registered: 2011-05-30
Posts: 20

Re: Why do I need consolekit or dbus?

I cant uninstall consolekit because its required for my xfce4 install?

[twl@userv ~]$ pacman -Qi consolekit 
Name           : consolekit
Version        : 0.4.5-1
URL            : [url]http://www.freedesktop.org/wiki/Software/ConsoleKit[/url]
Licenses       : GPL
Groups         : None
Provides       : None
Depends On     : polkit  zlib  libx11  dbus-glib
Optional Deps  : None
Required By    : xfce4-session
Conflicts With : None
Replaces       : None
Installed Size : 492.00 K
Packager       : Ionut Biru <ibiru@archlinux.org>
Architecture   : x86_64
Build Date     : Tue 31 May 2011 05:55:03 AM PDT
Install Date   : Tue 31 May 2011 08:42:36 AM PDT
Install Reason : Installed as a dependency for another package
Install Script : No
Description    : A framework for defining and tracking users, login sessions, and seats

[twl@userv ~]$ pacman -Qi xfce4-session
Name           : xfce4-session
Version        : 4.8.1-2
URL            : [url]http://www.xfce.org[/url]/
Licenses       : GPL2
Groups         : xfce4
Provides       : None
Depends On     : xfce4-panel  gconf  libgnome-keyring  libwnck  libsm  xorg-iceauth  upower  consolekit  hicolor-icon-theme
Optional Deps  : fortune-mod: for xfce4-tips
Required By    : None
Conflicts With : None
Replaces       : xfce4-toys
Installed Size : 3494.00 K
Packager       : Andreas Radke <andyrtr@archlinux.org>
Architecture   : x86_64
Build Date     : Mon 11 Apr 2011 11:07:11 AM PDT
Install Date   : Sun 29 May 2011 04:13:53 PM PDT
Install Reason : Explicitly installed
Install Script : Yes
Description    : A session manager for Xfce

update: I unisntalled xfce4-session and consolekit and all seems to be working well. I run headless tigervnc without xorg-server (use xvnc instead)

Last edited by twl (2011-06-09 17:09:00)

Offline

#14 2011-06-09 17:03:07

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Why do I need consolekit or dbus?

twl wrote:

I cant uninstall consolekit because its required for my xfce4 install?

and why do you want to uninstall it?


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#15 2011-06-09 17:09:44

twl
Member
Registered: 2011-05-30
Posts: 20

Re: Why do I need consolekit or dbus?

Inxsible wrote:
twl wrote:

I cant uninstall consolekit because its required for my xfce4 install?

and why do you want to uninstall it?

Yea your right... I uninstalled it and dont have any problems

Offline

#16 2011-06-09 17:10:07

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Why do I need consolekit or dbus?

firyice wrote:

I'll bring this up in the wiki sub-forum.  I'm somewhat new in these forums, but I assume that's the etiquette here?

The wiki keeps track of all changes, so if you are confident of the changes you want to make, you can just go ahead and add them -- they can be reverted at any time if necessary. When in doubt, it's not a problem to either post in the wiki subforum or on the 'talk' page of the item in question for feedback.

firyice wrote:

Then in general, from what i understand, DE users need to add the dbus daemon, and consolekit is taken care of for them by the DE.  Everyone else should really only use dbus or consolekit if they have a specific app that depends on them / gets errors without them?

Yes that's true. Many applications these days rely on dbus for IPC, but if you want to start out with a lean and mean system it's totally fine to see how for you can get without it.

firyice wrote:

This is probably what I needed to hear the most.  Being new, I thought I was just the odd one out in not understanding consolekit and dbus integration. Still, if anyone knows anything more than me that would further clear up my understanding of this, I'd be very grateful

You and me both! smile

edit: identity crisis fix0red

Last edited by litemotiv (2011-06-09 17:15:38)


ᶘ ᵒᴥᵒᶅ

Offline

#17 2011-06-09 17:12:58

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Why do I need consolekit or dbus?

lite, do I see you plagiarizing firyice's quotes and packaging them as your own ?? yikes


or do you just have an obsession with your nick, that you forgot to put his name and just typed your own tongue wink


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#18 2011-06-09 17:14:46

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Why do I need consolekit or dbus?

Inxsible wrote:

lite, do I see you plagiarizing firyice's quotes and packaging them as your own ?? yikes


or do you just have an obsession with your nick, that you forgot to put his name and just typed your own tongue wink

What?? Where?? WHO? (and wut?)


ᶘ ᵒᴥᵒᶅ

Offline

Board footer

Powered by FluxBB