If 'startx' is run from within a text console, ConsoleKit session is not marked 'active'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
consolekit (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: consolekit
Using consolekit 0.3.1-0ubuntu2 in Karmic.
If I login to a text console, a ConsoleKit session is created for that terminal. If I then run 'startx' (if I'm not running GDM, or 'startx :1' if I am running GDM), I do not have my normal permissions, because my session is not marked 'active', because my session has not been populated with the appropriate X device information. Running 'ck-list-sessions' from within X shows:
Session1:
unix-user = '1000'
realname = 'Paul Donohue'
seat = 'Seat1'
active = FALSE
x11-display = ''
is-local = TRUE
on-since = '2009-11-
I expect to have the same permissions whether I login via GDM, or login via a text console, then run 'startx'.
I believe the simplest solution is to replace the current /etc/X11/
CK_GET_
CK_LIST_
CK_LAUNCH_
if [ -x "$CK_GET_
if [ "$($CK_
fi
fi
This script checks for an existing CK session that is populated with an appropriate x11-display-device, and if one is not present, it creates a new session. This will prevent a duplicate CK session from being created when logging in via GDM (which already creates an appropriately populated CK session), but allows an additional CK session to be created when 'startx' is run from a text console (with a CK session that is not appropriately populated).
Using this script, I get my expected permissions, and 'ck-list-sessions' shows:
Session1:
unix-user = '1000'
realname = 'Paul Donohue'
seat = 'Seat1'
active = FALSE
x11-display = ''
is-local = TRUE
on-since = '2009-11-
Session2:
unix-user = '1000'
realname = 'Paul Donohue'
seat = 'Seat1'
active = TRUE
x11-display = ':1'
is-local = TRUE
on-since = '2009-11-
Another (less trivial) solution would be to patch ck-launch-session to allow updating the existing session with the appropriate X display information, then always run ck-launch-session from 90consolekit to perform this update. (See Bug #319396)
Changed in consolekit (Ubuntu): | |
status: | New → Confirmed |
Oops, the script shown in the original bug report and patch had a typo (== instead of =), this one is corrected.