[ConsoleKit] need better way to start sessions
Yclept Nemo
orbisvicis at gmail.com
Tue Mar 2 08:16:29 PST 2010
As more applications start depending on consolekit, the current method
to attach ck sessions is growing inadequate:
in ~/.xinitrc
"exec ck-launch-session window_manager"
So far:
polkit-gnome-authentication-agent
dbus ?
pulseaudio
to varying degrees all need to be started after the consolekit session
is initialized. Traditionally applications are started in ~/.xinitrc.
Now it seems they no longer can be. Alternatives don't appear that
feasible:
1) run the necessary programs afterwards in window-manager
initialization scripts.
- window-managers were not designed to start programs. Some
minimalistic window-managers would require adjustments or redesign or
bulky work-arounds to allow this.
2) in ~/.xserverrc run "exec ck-launch-session /usr/bin/X -nolisten tcp"
- doesn't work (tested): X is not a parent process of its clients
3) in ~/.xinitrc run all the files in ~/.xinitrc.d/*
- bulky redhat-ism (split everything up)
- Since it seems access to consolekit is decided on process
parentage (ppid) implementation won't work: processes from
~/.xinitrc.d/* would be owned by init
$ cat ~/.xinitrc
files=(~/.xinitrc.d/*)
for i in "${files[@]:0:${#files[@]}-1}"; do
"${i}"
done
exec "${files[@]: -1}"
echo "finished"
4) in ~/.xinitrc call a manual chain of "xinitrc_afterwards scripts"
For example:
exec ck-launch-session (one_process &; two_process &; exec window_manager)
- bulky workaround
- illegible syntax
- variation on (3)
So a suggestion:
A consolekit tool that will attach a ck session to the current
process. "ck-attach-session" would not return until the session has
been initialized. It can be placed in the beginning of ~/.xinitrc, and
it wouldn't require major changes to the current ~/.xinitrc workflow.
thanks,
More information about the ConsoleKit
mailing list