ConsoleKit

From ArchWiki
Revision as of 05:02, 14 April 2011 by Hobarrera (Talk | contribs) (Created page with "ConsoleKit is a framework for managing user sessions, and permissions. Some of the most common usages of ConsoleKit is allowing non-root users to mount removable media, and susp...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

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).


Usage with X Desktop Managers

Some login managers (KDM, GDM, LXDM) start ConsoleKit automatically when you log on.

Slim must be Slim#PolicyKit configured to use ConsoleKit if you are interested in it.

.xinitrc

When starting X without a DM, you need to start ConsoleKit manually, for example,

exec ck-launch-session startxfce4
Warning: If you run several applications which may spawn others that need CK, please read both following sections

ck-launch-session

Described in a few lines, running ck-launch-session my-session, starts my-session with proper enviroment variables so it (and it's children) can properly use CK.

Running several applications from xinitrc

If your xinitrc need to run several applications, not all of these will have CK's environment variables set. In the following example, only children of COMPIZ will be able to properly use CK, but children of xterm wont.

exec ck-launch-session compiz ccp&
xterm &

This can be an issue, for example, when using compiz standalone, and some other application launcher (gnome-do, kupfer, gmrun, xbindkeys, etc.), since children of the application launcher won't be able to use CK, they won't be able to, for example, mount removable media.

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).

.xinitrc:

ck-launch-session dbus-launch $HOME/.xstart

.xstart

compiz ccp &
Thunar &
Terminal

External Links