Menu

#32 qingy-1.0.0 autologin does not work with Consolekit-4.3

open
nobody
None
5
2011-02-02
2011-02-02
No

I used to use qingy to autologin my user on an htpc system. In that case it seems like qingy doesn't play nicely together with consolekit:

Session37:
unix-user = '1000'
realname = '(null)'
seat = 'Seat38'
session-type = ''
active = FALSE
x11-display = ':0'
x11-display-device = '/dev/tty7'
display-device = ''
remote-host-name = ''
is-local = FALSE
on-since = '2011-02-02T14:38:30.332608Z'
login-session-id = ''

If i disable the autologin feature i do get a session id and active = true.
I'm not quite sure what further information you would need. don't hesitate to ask for more input. :)

thanks & regards,
xout

Discussion

  • ichelm

    ichelm - 2011-06-10

    A patch submitted at 3314721.
    Could you test it?

     
  • Anonymous

    Anonymous - 2011-06-11

    Thank you very much for your work! If you would like to I'm ready for further testing. :)
    I applied your patch on my gentoo box without any errors. So far I can tell the patch solved all issues that come up with a non working consolekit registration (suspend, reboot, shutdown, usb automounting, ...).

    But I'm not quite sure whether or not the output of "ck-list-sessions" is correct. I get the following, while it is positive that login-session-id, active=TRUE and is-local=TRUE get assigned.

    "
    Session10:
    unix-user = '1000'
    realname = '(null)'
    seat = 'Seat1'
    session-type = ''
    active = TRUE
    x11-display = ':1'
    x11-display-device = '/dev/tty7'
    display-device = ''
    remote-host-name = ''
    is-local = TRUE
    on-since = '2011-06-11T11:25:12.143036Z'
    login-session-id = '5'
    Session9:
    unix-user = '1000'
    realname = '(null)'
    seat = 'Seat1'
    session-type = ''
    active = FALSE
    x11-display = ''
    x11-display-device = ''
    display-device = '/dev/tty6'
    remote-host-name = ''
    is-local = TRUE
    on-since = '2011-06-11T11:25:11.074079Z'
    login-session-id = '5'
    idle-since-hint = '2011-06-11T11:25:41.335494Z'
    "

    As you can see there are two sessions running, where the "Session9" is marked as active=FALSE but carries the same login-session-id as Session10. Is it like it is meant to be? As far as I know there should only be a single session for a single user.

     
  • ichelm

    ichelm - 2011-06-12

    Thank you for testing. Now I am confused and interested on your report.

    Basicaly, having two CK Sessions are harmless. For example, if you have login to text console you get an active CK session created by pam_ck_connector. And then you launch X session with ck-launch-session, you get new active CK session created by ck-launch-session, "Current Session" is switched to new CK Session and old CK session goes to inactive but still present.
    The important thing is "Current CK session is active or inactive?" at all.

    At my patch, Qingy(in fact, pam_ck_connector.so) starts only one CK session. And AFAIK, that session's "x11-display-device" and "x11-display" are not defined.
    So I guess you have a "ck-launch-session" on your custom xsession file. But such a way is that I couldn't get any usable CK Sessions on my test. I am really confused...

    Please tell me:
    (1): What way to launch X session are you using?
    (Or) Have you launch X session directly from Qingy? Or once logged into the console and then to startx?
    (2): Which desktop environment or window manager are you using?

    I'm sorry for my catastrophic grammer. Regards.

     
  • Anonymous

    Anonymous - 2011-06-13

    "(1): What way to launch X session are you using?"

    a. cat /etc/X11/Sessions/XBMC
    #exec ck-launch-session dbus-launch --sh-syntax --exit-with-session /usr/local/bin/xbmc-session
    exec /usr/local/bin/xbmc-session

    You are right. When I use line one of the session file I end up having two sessions registered by consolekit. Just like you can see in my previous post.

    b. cat /etc/env.d/90xsession (global default xsession)
    XSESSION="XBMC"

    c. cat /usr/local/bin/xbmc-session
    #!/bin/bash
    /usr/lib/xbmc/xbmc.bin --standalone --nolirc

    "(Or) Have you launch X session directly from Qingy? Or once logged into the console and then to startx?"
    I let qingy do the autologin:

    tty = 6
    {
    autologin
    {
    username = "xbmc"
    session = "XBMC"
    relogin = yes
    }
    }

    Complete qingy config: http://pastebin.com/krP9XJXt

    "(2): Which desktop environment or window manager are you using?"
    It's just plain xbmc on top of Xorg. There's no wm or de involved.

     
  • Anonymous

    Anonymous - 2011-06-13

    EDIT to comment 4:
    This is what I get when using "exec /usr/local/bin/xbmc-session":

    "
    ck-list-sessions
    Session2:
    unix-user = '1000'
    realname = '(null)'
    seat = 'Seat1'
    session-type = ''
    active = FALSE
    x11-display = ''
    x11-display-device = ''
    display-device = '/dev/tty6'
    remote-host-name = ''
    is-local = TRUE
    on-since = '2011-06-13T11:53:48.453539Z'
    login-session-id = '2'
    idle-since-hint = '2011-06-13T11:54:19.169685Z'
    "

     
  • Anonymous

    Anonymous - 2011-06-13

    EDIT to comment 5:

    Sorry I'm a bit tired...

    It's strange to see "active=FALSE" in comment 5. It used to be TRUE during the last couple of hours. After a reboot is TRUE again.

     
  • ichelm

    ichelm - 2011-06-13

    OK I see, maybe.
    If "x_args = vt7" on your Qingy setting is neccessary to run your system proper, you should have a "ck-launch-session" line on your xsession. (In this way, you will see two CK sessions but it will not make any problems.)
    If not (= no vt setting on x_args), my patch will work without any hacks.

    I think I can explain details about this issue. I will post details about this issue with a improved patch in the future, ...if I can.

    Notes:
    Qingy doesn't care about dbus-launch. If your system needs DBus session bus, it is good to keep "dbus-launch --sh-syntax --exit-with-session" on your xsession.

     
  • Anonymous

    Anonymous - 2011-06-13

    The "vt7" x_arg was left from a tryout earlier the day. Meanwhile I removed it "vt7 tty6" from x_args.

    "dbus-launch --sh-syntax --exit-with-session" seems to be necessary in my case. XBMC logs errors when I leave it away (That's somehow strange but not related to this bug because dbus is started in the default runlevel anyway).

    However thanks for your efforts && keep up the good work. ;) Like I said earlier just ping me in case you need a testee...

     
  • Anonymous

    Anonymous - 2011-06-13

    Btw I'm gonna leave a note in Gentoo-Forums consolekit thread for those having problems with autologin.

     

Log in to post a comment.