Difference between revisions of "ConsoleKit"

From ArchWiki
Jump to: navigation, search
(Usage with X Desktop Managers: fixed a link)
m (rm duplicate info + mv desktop manager -> display manager)
Line 1: Line 1:
 
[[Category:Security (English)]]
 
[[Category:Security (English)]]
 
[[Category:Daemons and system services (English)]]
 
[[Category:Daemons and system services (English)]]
 +
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).
  
ConsoleKit is a framework for managing user sessions, and permissions.
+
== Display manager usage==
  
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).
+
=== ck-launch-session ===
 
+
To launch an X session with consolekit, using a [[display manager]] like [[SLiM]], append the following to the {{Codeline|exec}} statement in {{Filename|~/.xinitrc}} e.g.:
 
+
== 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 [[Display Manager]], you need to launch ConsoleKit from [[xinitrc|~/.xinitrc]], for example:
+
  
 
  exec ck-launch-session startxfce4
 
  exec ck-launch-session startxfce4
  
{{Warning | If you run several applications which may spawn others that need CK, please read both following sections}}
+
This starts xfce with proper enviroment variables so it and it's children are able to use consolekit. Display managers like [[KDM]], [[GDM]] and LXDM starts consolekit automatically with each X session.
  
=== ck-launch-session ===
+
=== Running several applications from ~/.xinitrc ===
Described in a few lines, running <code>ck-launch-session my-session</code>, starts my-session with proper enviroment variables so it (and it's children) can properly use CK.
+
If several applications are to be executed from {{Filename|~/.xinitrc}}, not all of these will have consolekit environment variables set. In the following example, only children of compiz will be able to properly use conosolekit, but children of xterm won't.
 
+
=== 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 won't.
+
  
 
  xterm &
 
  xterm &
 
  exec ck-launch-session compiz ccp
 
  exec ck-launch-session compiz ccp
  
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.
+
Typically, this can be an issue when for example using compiz standalone and some other application launchers, (gnome-do, kupfer, gmrun, xbindkeys, etc.) since children of the application launcher won't be able to use consolekit. A dirty workaround is to have the entire session started by a second script, e.g. {{Filename|~/.xstart}}. Don't forget dbus-launch, it's likely you need it too:
 
+
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).
+
  
 
{{File|name=~/.xinitrc|content=
 
{{File|name=~/.xinitrc|content=
 
ck-launch-session dbus-launch $HOME/.xstart}}
 
ck-launch-session dbus-launch $HOME/.xstart}}
 +
  
 
{{File|name=~/.xstart|content=
 
{{File|name=~/.xstart|content=
Line 41: Line 29:
 
Terminal}}
 
Terminal}}
  
== External Links ==
+
== More resources ==
*[https://bbs.archlinux.org/viewtopic.php?id=116853  Solution to ck-launch-session, compiz and mounting in thunar/udisks]
+
*[https://bbs.archlinux.org/viewtopic.php?id=116853  ck-launch-session, compiz and mounting in thunar/udisks]

Revision as of 14:59, 14 July 2011

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

Display manager usage

ck-launch-session

To launch an X session with consolekit, using a display manager like SLiM, append the following to the Template:Codeline statement in Template:Filename e.g.:

exec ck-launch-session startxfce4

This starts xfce with proper enviroment variables so it and it's children are able to use consolekit. Display managers like KDM, GDM and LXDM starts consolekit automatically with each X session.

Running several applications from ~/.xinitrc

If several applications are to be executed from Template:Filename, not all of these will have consolekit environment variables set. In the following example, only children of compiz will be able to properly use conosolekit, but children of xterm won't.

xterm &
exec ck-launch-session compiz ccp

Typically, this can be an issue when for example using compiz standalone and some other application launchers, (gnome-do, kupfer, gmrun, xbindkeys, etc.) since children of the application launcher won't be able to use consolekit. A dirty workaround is to have the entire session started by a second script, e.g. Template:Filename. Don't forget dbus-launch, it's likely you need it too:

Template:File


Template:File

More resources