last update broke consolekit session creation Reproducible: Always Steps to Reproduce: 1.update from sys-auth/consolekit-0.4.2-r2 to sys-auth/consolekit-0.4.2-r3 2.launch session 3.ck-list-session
1. Logout from your shell. Including tty, console. Full relogin. 2. Check output of `ck-list-session`, it should show one session for console now. It should be active. 3. Then start X11. Check output again. It should now show 2 sessions, the first should become inactive and the new one active: Session1: unix-user = '1000' realname = '(null)' seat = 'Seat1' session-type = '' active = FALSE x11-display = '' x11-display-device = '' display-device = '/dev/tty1' remote-host-name = '' is-local = TRUE on-since = '2010-10-21T13:46:28.100890Z' login-session-id = '4294967295' idle-since-hint = '2010-10-21T14:00:17.007327Z' Session4: unix-user = '1000' realname = '(null)' seat = 'Seat1' session-type = '' active = TRUE x11-display = ':0' x11-display-device = '/dev/tty7' display-device = '/dev/tty1' remote-host-name = '' is-local = TRUE on-since = '2010-10-21T13:59:47.640463Z' login-session-id = '4294967295' Also, make sure you have up-to-date pam.d and xinitrc.d files: # emerge --noconfmem pambase consolekit shadow # etc-update (make sure to update everything) If relogging to the shell doesn't help, or re-emerging those 3 pkgs with the --noconfmem and updating /etc files, need more information howto reproduce, the exact commands or methods etc. you use to start X11
sys-auth/pambase must be emerged with USE="consolekit" and sys-auth/consolekit with USE="pam"
hi, use flags: sys-auth/consolekit-0.4.2-r3 was built with the following: USE="pam policykit -debug -doc -test" sys-libs/pam-1.1.2 was built with the following: USE="cracklib nls -audit -berkdb -debug (-selinux) -test -vim-syntax" sys-auth/pambase-20100925 was built with the following: USE="consolekit cracklib sha512 -debug -gnome-keyring -kerberos -minimal -mktemp -passwdqc (-selinux) -ssh" sys-apps/shadow-4.1.4.2-r6 was built with the following: USE="cracklib nls pam -audit (-selinux) -skey" i startX by qingy\slim - they call \etc\X11\Session\openbox-lxde they start sessinon: exec /usr/bin/ck-launch-session /usr/bin/dbus-launch /usr/bin/lxsession -s YL -e LXDE
So does it work if you login to console and run "startx" with ~/.xinitrc that has: exec ck-launch-session lxsession -s YL -e LXDE (or similar, no idea what -s and -e parameters do) What's the ck-list-sessions output from console (before X11) has started, and then after?
1 login tty Session1: unix-user = '1000' realname = '(null)' seat = 'Seat1' session-type = '' active = TRUE x11-display = '' x11-display-device = '' display-device = '/dev/tty1' remote-host-name = '' is-local = TRUE on-since = '2010-10-23T15:09:28.851050Z' login-session-id = '' 2. startX with .xinit Session1: unix-user = '1000' realname = '(null)' seat = 'Seat1' session-type = '' active = FALSE x11-display = '' x11-display-device = '' display-device = '/dev/tty1' remote-host-name = '' is-local = TRUE on-since = '2010-10-23T15:09:28.851050Z' login-session-id = '' idle-since-hint = '2010-10-23T15:10:10.003743Z' Session2: unix-user = '1000' realname = '(null)' seat = 'Seat2' session-type = '' active = FALSE x11-display = ':0' x11-display-device = '/dev/tty7' display-device = '/dev/tty1' remote-host-name = '' is-local = FALSE on-since = '2010-10-23T15:09:44.455811Z' login-session-id = '' 3. close X session & back to tty Session1: unix-user = '1000' realname = '(null)' seat = 'Seat1' session-type = '' active = TRUE x11-display = '' x11-display-device = '' display-device = '/dev/tty1' remote-host-name = '' is-local = TRUE on-since = '2010-10-23T15:09:28.851050Z' login-session-id = ''
(In reply to comment #5) > login-session-id = '' login-session-id shouldn't be empty... i'm not sure if that matters. did you restart the consolekit init.d service after upgrade? what *exactly* did you put in .xinitrc?
(In reply to comment #6) > (In reply to comment #5) > > login-session-id = '' > > login-session-id shouldn't be empty... i'm not sure if that matters. did you > restart the consolekit init.d service after upgrade? what *exactly* did you put > in .xinitrc? > of course
Anything change if you add: session optional pam_loginuid.so Before the "pam_ck_connector.so" line in /etc/pam.d/system-login ? Ref. http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg828464.html
Also is kernel configured with auditing support? With CONFIG_AUDIT=y, you can check by: zgrep CONFIG_AUDIT /proc/config.gz or grep CONFIG_AUDIT /usr/src/linux/.config Ref. http://bugs.gentoo.org/show_bug.cgi?id=336634#c7
(In reply to comment #8) > Anything change if you add: > > session optional pam_loginuid.so > > Before the "pam_ck_connector.so" line in /etc/pam.d/system-login ? > > Ref. > http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg828464.html > this helps Session4: unix-user = '1000' realname = '(null)' seat = 'Seat1' session-type = '' active = FALSE x11-display = '' x11-display-device = '' display-device = '/dev/tty1' remote-host-name = '' is-local = TRUE on-since = '2010-10-23T15:44:20.295673Z' login-session-id = '1' idle-since-hint = '2010-10-23T15:45:06.006989Z' Session5: unix-user = '1000' realname = '(null)' seat = 'Seat1' session-type = '' active = TRUE x11-display = ':0' x11-display-device = '/dev/tty7' display-device = '/dev/tty1' remote-host-name = '' is-local = TRUE on-since = '2010-10-23T15:44:39.139794Z' login-session-id = '1' but this is does not work with qingy or slim
(In reply to comment #9) > Also is kernel configured with auditing support? With CONFIG_AUDIT=y, you can > check by: > > zgrep CONFIG_AUDIT /proc/config.gz > or > grep CONFIG_AUDIT /usr/src/linux/.config > > > Ref. http://bugs.gentoo.org/show_bug.cgi?id=336634#c7 > # CONFIG_AUDIT_ARCH is not set CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y CONFIG_AUDIT_WATCH=y CONFIG_AUDIT_TREE=y CONFIG_AUDIT_GENERIC=y
pam-bugs@: see Comment #9 and Comment #10. Does this modification make sense for pambase?
I guess it should be done indeed… do you wish to move this to a pambase bug, or can you create a new one as reference? I'll try to work on it today after I finish my server's updates.
I that helps in any way, I can reproduce this with xfce-4.7 and consolekit-0.4.2-r3. Everything was fine with -r2 (active=TRUE, is-local=TRUE). Now rebuilding pambase with USE=consolekit, and I will report back wrt various leads from Samuli asap.
I just tested startx, gdm, kdm and slim and all of them work correctly here with: sys-auth/consolekit-0.4.2-r3 (USE=pam) sys-auth/pambase-20101024 (USE=consolekit) .xinitrc: exec ck-launch-session startxfce4 With startx I'm seeing 1 session for console, and 2 sessions when X11 started. With slim/gdm/kdm I'm seeing correctly 1 session. In all cases is-local/active=TRUE So guys, provide me a way to reproduce this or I have to assume "notabug" :)
(In reply to comment #15) > So guys, provide me a way to reproduce this or I have to assume "notabug" :) > Ahah :D. Let's provide you with relevant piece of information then: - ~amd64 as of Tue, 26 Oct 2010 11:45:02 +0000 - xfce-4.7 - sys-auth/consolekit-0.4.2-r3: USE="pam consolekit" - sys-auth/pambase-20101024: USE="consolekit cracklib sha512" - slim: in slim.conf: "login_cmd exec /bin/bash -login ~/.xinitrc %session" - .xinitrc: exec ck-launch-session startxfce4 No pam_loginuid.so hack yet. No matter if I start a X session with startx or slim, is-local and active are still FALSE.
(In reply to comment #16) > (In reply to comment #15) > > So guys, provide me a way to reproduce this or I have to assume "notabug" :) > > > Ahah :D. Let's provide you with relevant piece of information then: > > - ~amd64 as of Tue, 26 Oct 2010 11:45:02 +0000 > - xfce-4.7 > - sys-auth/consolekit-0.4.2-r3: USE="pam consolekit" > - sys-auth/pambase-20101024: USE="consolekit cracklib sha512" > - slim: in slim.conf: > "login_cmd exec /bin/bash -login ~/.xinitrc %session" > - .xinitrc: > exec ck-launch-session startxfce4 With those exact settings, works fine here > No pam_loginuid.so hack yet. No matter if I start a X session with startx or > slim, is-local and active are still FALSE. > That's already included in pambase-20101024
How about providing output of the daemon? See, http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg828457.html
+ 27 Oct 2010; Samuli Suominen <ssuominen@gentoo.org> + consolekit-0.4.2-r3.ebuild: + Check CONFIG_AUDITSYSCALL for /proc/<pid>/sessionid wrt #342291. To be continued in bug 342345...
*** Bug 343033 has been marked as a duplicate of this bug. ***
had to downgrade to shadow-4.1.4.2-r5 to revert to older broken behaviour as upgrading to shadow-4.1.4.2-r6, pambase-20101024 and consolekit-0.4.2-r4 still broke a lot of things in gnome.
Created attachment 252821 [details, diff] reenable is is-local I investigated this issue quit a bit since i am also a slim user... I discovered that it works for gdm because gdm calls the dbus interface of consolekit directly and forces itself to be local... For slim we make use of ck-launch-session which does not force this action... What i discovered is that new in 0.4.2 the consolekit session info doesnt detect local as it used to anymore and relies on the consolekit deamon to reconise local session which it doesnt... so i made it work like it worked in 0.4.1
(In reply to comment #22) > Created an attachment (id=252821) [details] > reenable is is-local > > I investigated this issue quit a bit since i am also a slim user... > I discovered that it works for gdm because gdm calls the dbus interface of > consolekit directly and forces itself to be local... > For slim we make use of ck-launch-session which does not force this action... > What i discovered is that new in 0.4.2 the consolekit session info doesnt > detect local as it used to anymore and relies on the consolekit deamon to > reconise local session which it doesnt... so i made it work like it worked in > 0.4.1 > slim will use pam ( consolekit's pam_ck_connector.so ) and works same way `startx` does. i've tested slim to be working just fine.
just stumbled upon this report while searching for a solution on the problem described here. a. my setup: sys-auth/consolekit-0.4.2-r4 || \ sys-auth/consolekit-0.4.3 (USE="kernel_linux pam policykit") sys-auth/pambase-20101024 (USE="consolekit cracklib minimal || -minimal sha512") sys-apps/shadow-4.1.4.2-r6 (USE="cracklib nls pam") sys-apps/dbus-1.4.0 (USE="null") already re-emerged those with the --noconfmem parameter. b. kernel config grep -i CONFIG_AUDIT /usr/src/linux/.config # CONFIG_AUDIT_ARCH is not set CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y CONFIG_AUDIT_WATCH=y CONFIG_AUDIT_TREE=y CONFIG_AUDIT_GENERIC=y c. how i log in: 1. cat /etc/env.d/90xsession XSESSION="/usr/local/bin/xbmc-gentoo" 2. cat /usr/local/bin/xbmc-gentoo #!/bin/bash /usr/bin/xsetbg -onroot -quiet -fullscreen -display :0 /home/xbmc/Media/Local/Pics/Wallpapers/xbmc_walls.jpg & /usr/bin/xsetroot -cursor /opt/.modResources/xcursor/emptyCursor.xbm /opt/.modResources/xcursor/emptyCursor.xbm & /usr/local/bin/xbmc-wiiremote >/dev/null 2>&1 & while true; do DISPLAY=:0.0 /usr/lib/xbmc/xbmc.bin --standalone --nolirc sleep 1 done 3. cat /etc/conf.d/local ... /usr/local/bin/xbmc-startx >/dev/null 2>&1 & ... 4. cat /usr/local/bin/xbmc-startx #!/bin/bash USER="xbmc" SHELL="/bin/bash" CMD_SU="/bin/su" ARGS_SU="$USER -s $SHELL -c -l" CMD_X="/usr/bin/startx" CMD_CK="exec ck-launch-session" ARGS_X="vt7 -nolisten tcp -novtswitch +bs -nocursor -br -deferglyphs all -quiet -allowMouseOpenFail" while true; do $CMD_SU - $ARGS_SU "$CMD_CK $CMD_X -- $ARGS_X" done d. result 1. fresh boot ck-list-sessions Session1: unix-user = '1000' realname = '(null)' seat = 'Seat2' session-type = '' active = FALSE x11-display = '' x11-display-device = '' display-device = '' remote-host-name = '' is-local = FALSE on-since = '2010-12-07T18:52:47.915017Z' login-session-id = '' Session2: unix-user = '1000' realname = '(null)' seat = 'Seat3' session-type = '' active = FALSE x11-display = ':0' x11-display-device = '/dev/tty7' display-device = '' remote-host-name = '' is-local = FALSE on-since = '2010-12-07T18:52:49.896551Z' login-session-id = '' Session3: unix-user = '1000' realname = '(null)' seat = 'Seat4' session-type = '' active = FALSE x11-display = '' x11-display-device = '' display-device = '/dev/ssh' remote-host-name = 'buckaroo.ghostshell' is-local = FALSE on-since = '2010-12-07T18:53:11.844999Z' login-session-id = '1' => active/is-local = false => login-session-id gets only assigned to the remote ssh session 2. /etc/init.d/local restart ck-list-sessions Session4: unix-user = '1000' realname = '(null)' seat = 'Seat5' session-type = '' active = FALSE x11-display = '' x11-display-device = '' display-device = '' remote-host-name = '' is-local = FALSE on-since = '2010-12-07T18:54:56.887529Z' login-session-id = '1' Session5: unix-user = '1000' realname = '(null)' seat = 'Seat6' session-type = '' active = FALSE x11-display = ':0' x11-display-device = '/dev/tty7' display-device = '' remote-host-name = '' is-local = FALSE on-since = '2010-12-07T18:54:58.115872Z' login-session-id = '1' Session3: unix-user = '1000' realname = '(null)' seat = 'Seat4' session-type = '' active = FALSE x11-display = '' x11-display-device = '' display-device = '/dev/ssh' remote-host-name = 'buckaroo.ghostshell' is-local = FALSE on-since = '2010-12-07T18:53:11.844999Z' login-session-id = '1' => active/is-local = false => login-session-id gets assigned ---------- even if i execute startx manually i won't get active/is-local = true if possible could anyone please point me into a direction or could it be that this bug isn't fixed, yet? regards
Why is this bug closed? I can't really find the solution anywhere in the comments
(In reply to comment #25) > Why is this bug closed? I can't really find the solution anywhere in the > comments > The kernel check was added to consolekit's ebuild for the sysauditcall option. After that's solved, the rest of issues here were related to bug 342345 (so this should continue there). And if you have _third_ issue, you propably want a new bug instead using this one :)
(In reply to comment #26) > (In reply to comment #25) > > Why is this bug closed? I can't really find the solution anywhere in the > > comments > > > > The kernel check was added to consolekit's ebuild for the sysauditcall option. > After that's solved, the rest of issues here were related to bug 342345 (so > this should continue there). > And if you have _third_ issue, you propably want a new bug instead using this > one :) > Actually no. CONFIG_AUDIT was disabled on my kernel. Once I turned it on, everything works as expected. If CONFIG_AUDIT is mandatory for consolekit to work, can't you just make it || die if this kernel option is disabled?
Because the QA policy is _not_ to die on kernel options switches if they are not going to cause the package to fail to build (i.e. for modules).
(In reply to comment #28) > Because the QA policy is _not_ to die on kernel options switches if they are > not going to cause the package to fail to build (i.e. for modules). > and also because... gnome-base/gdm is using it's internal consolekit "support" so it doesn't need the kernel option, and happens to work without it. so there's case or cases in tree where it shouldn't be fatal. and because it's so hard to select between them, this should always stay a warning.
so should i file a new bug report for my comment (#24)?
(In reply to comment #30) > so should i file a new bug report for my comment (#24)? > Your command is wrong $CMD_SU - $ARGS_SU "$CMD_CK $CMD_X -- $ARGS_X" This will invoke ck-launch-session /usr/bin/startx. This is not correct. You should put your custom scripts under .xinitrc file and call exec ck-launch-session <session_name> like openbox-session, gnome-session or whatever. This is a bad configuration issue. Not a consolekit bug
> Your command is wrong > > $CMD_SU - $ARGS_SU "$CMD_CK $CMD_X -- $ARGS_X" > > This will invoke ck-launch-session /usr/bin/startx. This is not correct. sorry for that one. that was just a leftover from my different try outs and was accidentially published in my post. normally i don't call ck-launch-session from this script. > You should put your custom scripts under .xinitrc file and call exec > ck-launch-session <session_name> like openbox-session, gnome-session or > whatever. This is a bad configuration issue. Not a consolekit bug how would i do that in a situation where i defined my session globally in /etc/env.d/90xsession? i don't want users to accidentially delete or alter .xinitrc. by defining the session globally i only have to do it for all users once.
/etc/X11/xinit/xinitrc is the right place As I said refrain from posting to this bug. Forums is a more appropriate place