ck-launch-session doesn't set x11-display-device

Bug #535521 reported by Alkis Georgopoulos on 2010-03-10
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
consolekit (Ubuntu)
Undecided
Unassigned
ltsp (Ubuntu)
Undecided
Alkis Georgopoulos

Bug Description

Binary package hint: consolekit

consolekit version: 0.4.1-3ubuntu1 (Lucid alpha3)

In /etc/X11/Xsession.d/90consolekit there's a call to ck-launch-session which registers a session if one hasn't been registered yet.
This is true for example in LTSP, which uses LDM instead of GDM.

The problem is that ck-launch-session doesn't set x11-display-device, so ck-list-sessions for that session contains:
 active = FALSE
 x11-display = ':0'
 x11-display-device = ''
 display-device = '/dev/pts/0'

If I replace that ck-launch-session call with a python script of my own, which calls OpenSessionWithParameters with
  params.append (("x11-display-device", dbus.String ('/dev/tty7', variant_level=1)))
instead, then the session correctly contains:
 active = TRUE
 x11-display = ':0'
 x11-display-device = '/dev/tty7'
 display-device = ''

Maybe the problem is that ck-launch-session doesn't have the necessary permissions to call `fgconsole` to check the active tty, and so it should find some non privileged way to do it?

Of course, the end result is that PolicyKit doesn't work as expected, since the session is considered not active, so we can't mount drives etc.

Changed in ltsp (Ubuntu):
assignee: nobody → Alkis Georgopoulos (alkisg)
Alkis Georgopoulos (alkisg) wrote :

This was fixed in LTSP 5.2. `su` was used instead of `ck-launch-session`, along with $CKCON_X11_DISPLAY and $CKCON_X11_DISPLAY_DEVICE pam environment parameters, so that now LTSP fat clients properly get an active CK session.

Closing in LTSP, the problem is still there on consolekit though.

Changed in ltsp (Ubuntu):
status: New → Fix Released
Psy[H[] (vovik-wfa) wrote :

ubuntu natty, current updates
when starting openbox session with:
ck-launch-session dbus-launch --exit-with-session openbox-session

I get
$ ck-list-sessions
Session16:
 unix-user = '1000'
 realname = 'psycho'
 seat = 'Seat4'
 session-type = ''
 active = FALSE
 x11-display = ':0'
 x11-display-device = '/dev/tty8'
 display-device = '/dev/tty1'
 remote-host-name = ''
 is-local = FALSE
 on-since = '2011-04-29T20:09:41.704431Z'
 login-session-id = ''

Alkis Georgopoulos (alkisg) wrote :

Since Ubuntu switched to logind, I don't think this is ever going to get fixed.

Changed in consolekit (Ubuntu):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers