Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

[solved] consolekit returns "active = FALSE"

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
12 posts • Page 1 of 1
Author
Message
hal2050
n00b
n00b
Posts: 47
Joined: Sat Jul 19, 2008 6:19 pm

[solved] consolekit returns "active = FALSE"

  • Quote

Post by hal2050 » Sun Jan 02, 2011 3:49 pm

hi all,

i'm referring to this bug report: [bug=]http://bugs.gentoo.org/342291[/bug]
i was told that my problem is not related to a bug of consolekit, but rather related to an invalid configuration. therefore i hope that anybody could point me into the right direction. :)
what i can tell is that everything used to work fine before upgrading to recent versions of relevant packages (please see 2.a).

###

0. the problem
ck-list-sessions returns:
- active = FALSE
- is-local = FALSE
- login-session-id = ''
0.a the result:
it's not possible to reboot, shutdown, suspend the system or to automount removeable media (usb).

###

1. my system:
i'm running gentoo as a dedicated htpc system with plain xbmc on top of xorg. there's no de, dm or wm involved.

###

2. my setup:
2.a relevant packages:
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.

2.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
###

3. login and xorg / xbmc starting procedure
first of all i defined a global session to prevent users to alter or delete a .xinitrc file in their ~/ directory.

3.a cat /etc/env.d/90xsession

Code: Select all

XSESSION="/usr/local/bin/xbmc-gentoo"
3.b cat /usr/local/bin/xbmc-gentoo

Code: Select all

#!/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.c cat /etc/conf.d/local

Code: Select all

/usr/local/bin/xbmc-startx >/dev/null 2>&1 &
3.d cat /usr/local/bin/xbmc-startx

Code: Select all

#!/bin/bash

USER="xbmc"
SHELL="/bin/bash"
CMD_SU="/bin/su"
ARGS_SU="$USER -s $SHELL -c -l"
CMD_X="/usr/bin/startx"
ARGS_X="vt7 -nolisten tcp -novtswitch +bs -nocursor -br -deferglyphs all -quiet
-allowMouseOpenFail"

while true; do

    $CMD_SU - $ARGS_SU "$CMD_X -- $ARGS_X"

done
4. result
4.a fresh boot

Code: Select all

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

4.b /etc/init.d/local restart

Code: Select all

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
this does also apply when i manually execute ck-launch-session:

Code: Select all

Session7:
	unix-user = '1000'
	realname = '(null)'
	seat = 'Seat8'
	session-type = ''
	active = FALSE
	x11-display = ''
	x11-display-device = ''
	display-device = '/dev/pts/0'
	remote-host-name = ''
	is-local = FALSE
	on-since = '2011-01-02T15:40:40.608361Z'
	login-session-id = '3'
the difference is that i get a login-session-id.

###

according to the bug report something is screwed up in my login/autostart procedure.
what's your proposal to solve this issue and is there a better practice to autologin users and to autostart a session?

thanks in advance && regards,
hal2050
Last edited by hal2050 on Wed Jan 19, 2011 1:05 pm, edited 1 time in total.
Top
hal2050
n00b
n00b
Posts: 47
Joined: Sat Jul 19, 2008 6:19 pm

  • Quote

Post by hal2050 » Tue Jan 04, 2011 11:53 am

anyone :?:
Top
VoidMage
Watchman
Watchman
User avatar
Posts: 6196
Joined: Sat Oct 14, 2006 8:43 am

  • Quote

Post by VoidMage » Tue Jan 04, 2011 12:22 pm

hal2050 wrote:anyone :?:
Don't nag.

Perhaps changing /etc/conf.d/local entry to

Code: Select all

ck-launch-session /usr/local/bin/xbmc-startx >/dev/null 2>&1 &
will help.

But I think the problem lies in using 'su'.
Top
hal2050
n00b
n00b
Posts: 47
Joined: Sat Jul 19, 2008 6:19 pm

  • Quote

Post by hal2050 » Tue Jan 04, 2011 12:54 pm

VoidMage wrote:
hal2050 wrote:anyone :?:
Don't nag.
sorry for that. i was just curious that nobody responded yet, although there are a lot of people suffering this issue atm.
VoidMage wrote:Perhaps changing /etc/conf.d/local entry to

Code: Select all

ck-launch-session /usr/local/bin/xbmc-startx >/dev/null 2>&1 &
will help.
i tried that in the past already and it did not work. afaik ck-launch-session has to be run in conjunction with a session (openbox-session, gnome-session, etc.) but not with X directly.
nevertheless i tried your proposal again which results in the same described above.
VoidMage wrote:But I think the problem lies in using 'su'.
so i disabled the entry in "conf.d/local" to execute startx manually as user without using su in first place. this leads to the same result described above.

edit:
for testing purposes i disabled the entry in "env.d/90xsession" and "conf.d/local". instead i created a .xinitrc in ~/.

Code: Select all

cat .xinitrc
#!/bin/bash
exec ck-launch-session /usr/local/bin/xbmc-gentoo
result of "startx &":

Code: Select all

ck-list-sessions 
Session1:
	unix-user = '1000'
	realname = '(null)'
	seat = 'Seat2'
	session-type = ''
	active = FALSE
	x11-display = ''
	x11-display-device = ''
	display-device = '/dev/ssh'
	remote-host-name = 'buckaroo.ghostshell'
	is-local = FALSE
	on-since = '2011-01-04T13:13:07.679723Z'
	login-session-id = '1'
Session3:
	unix-user = '1000'
	realname = '(null)'
	seat = 'Seat4'
	session-type = ''
	active = FALSE
	x11-display = ':0'
	x11-display-device = '/dev/tty2'
	display-device = '/dev/pts/0'
	remote-host-name = ''
	is-local = FALSE
	on-since = '2011-01-04T13:15:02.656688Z'
	login-session-id = '1'
edit 2:
simply launching a plain session from console

Code: Select all

ck-launch-session
results in

Code: Select all

Session4:
	unix-user = '1000'
	realname = '(null)'
	seat = 'Seat5'
	session-type = ''
	active = FALSE
	x11-display = ''
	x11-display-device = ''
	display-device = '/dev/pts/0'
	remote-host-name = ''
	is-local = FALSE
	on-since = '2011-01-04T13:21:49.841513Z'
	login-session-id = '1'
, too.
Top
drinstant
n00b
n00b
Posts: 24
Joined: Thu Apr 08, 2010 9:16 am

  • Quote

Post by drinstant » Tue Jan 18, 2011 10:41 am

same problem here.
Top
hal2050
n00b
n00b
Posts: 47
Joined: Sat Jul 19, 2008 6:19 pm

  • Quote

Post by hal2050 » Tue Jan 18, 2011 10:53 am

unfortunately i didn't manage to get rid of my problem. :/
i triple-checked ssuominen's consolekit sticky (http://forums.gentoo.org/viewtopic-t-858965.html), and had about 99% of his hints in my system already. i'm rather clueless at this point.
Top
drinstant
n00b
n00b
Posts: 24
Joined: Thu Apr 08, 2010 9:16 am

  • Quote

Post by drinstant » Tue Jan 18, 2011 11:15 am

I managed to get it working. I've also followed that guide without success, got fed up and simply re-emerged dbus dbus-glib pambase gvfs shadow udisks upower polkit with the --noconfmem flag. Then I noticed that consolekit wasn't explicitly emerged, so I re-emerged that one too, with the same flag. In the end, this did the trick. Geez. It already sucks to do revdep-rebuild all the time, but this kind of guesswork is really tedious.
Top
hal2050
n00b
n00b
Posts: 47
Joined: Sat Jul 19, 2008 6:19 pm

  • Quote

Post by hal2050 » Tue Jan 18, 2011 11:26 am

ok, i've got no problem to re-emerge those packages again. :)

could you please check the list if there are any differences to yours? only difference i see is i don't use gvfs.

Code: Select all

emerge -avq1 --noconfmem dbus dbus-glib pambase shadow udisks upower polkit consolekit
[ebuild   R   ] sys-apps/dbus-1.4.1  USE="X -debug -doc (-selinux) -static-libs -test" 
[ebuild   R   ] dev-libs/dbus-glib-0.92  USE="bash-completion -debug -doc -static-libs -test" 
[ebuild   R   ] sys-auth/polkit-0.99-r1  USE="nls pam -debug -doc -examples -gtk (-introspection)" 
[ebuild   R   ] sys-auth/consolekit-0.4.3  USE="pam policykit -debug -doc -test" 
[ebuild   R   ] sys-fs/udisks-1.0.2  USE="bash-completion nls -debug -doc -remote-access" 
[ebuild   R   ] sys-power/upower-0.9.7  USE="ipod -debug -doc (-introspection)" 
[ebuild   R   ] sys-auth/pambase-20101024  USE="consolekit cracklib minimal sha512 -debug -gnome-keyring -mktemp -pam_krb5 -pam_ssh -passwdqc (-selinux)" 
[ebuild   R   ] sys-apps/shadow-4.1.4.2-r6  USE="cracklib nls pam -audit (-selinux) -skey" 

edit:
i just gave it a shot but as expected it did not help. etc-update only listed "/etc/pam.d/system-login" which i overwrote.
Top
drinstant
n00b
n00b
Posts: 24
Joined: Thu Apr 08, 2010 9:16 am

  • Quote

Post by drinstant » Tue Jan 18, 2011 2:24 pm

Here's what might be the problem: Start X from console with a simple startx as user. I suspect 'su' to be the culprit. I'll test that suspicion later on myself.
Top
hal2050
n00b
n00b
Posts: 47
Joined: Sat Jul 19, 2008 6:19 pm

  • Quote

Post by hal2050 » Wed Jan 19, 2011 10:58 am

did you test it?

just asking because it didn't make any difference in my tests above. :/
Top
drinstant
n00b
n00b
Posts: 24
Joined: Thu Apr 08, 2010 9:16 am

  • Quote

Post by drinstant » Wed Jan 19, 2011 11:40 am

yes, to me it made all the difference. I've got

su - instant -l -c 'exec startx -- vt7 >& ~/.xsession-errors' &

in my /etc/conf.d/local which seems to break consolekit. Manual startx works fine.
Top
hal2050
n00b
n00b
Posts: 47
Joined: Sat Jul 19, 2008 6:19 pm

  • Quote

Post by hal2050 » Wed Jan 19, 2011 11:58 am

that's really strange.

did you execute "startx" locally or while you were on a ssh session?
i always tried this over a ssh session, because i'm using my system as an htpc. maybe it's worth a try to connect a keyboard...

but let's assume this would fix my problem. that leads me to another question. how would i then create some kind of autologin procedure without any dm?

edit:

ok here are some results:

note: consolekit is in the default runlevel.
local login at login prompt:

Code: Select all

Session5:
	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 = '2011-01-19T12:44:04.066490Z'
	login-session-id = '4'
	idle-since-hint = '2011-01-19T12:44:44.010608Z'
well pretty promising. seems to make a real difference whether or not one starts X over ssh or locally.

firing startx while being logged in locally:

Code: Select all

Session12:
	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 = '2011-01-19T12:54:47.374403Z'
	login-session-id = '4'
heh. pretty nice. all is in state "true" now.

is it normal that my local shell session gets unactive after starting X?

Code: Select all

Session13:
	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 = '2011-01-19T12:57:29.514985Z'
	login-session-id = '5'
after another research i found a wiki entry at archlinux describing that sudo and su do not work together with consolekit: https://wiki.archlinux.org/index.php/Start_X_at_Boot

i guess i'm going to open a new thread to find a solution for a autologin solution.

thanks for your help and hints drinstant!

CONCLUSION:
- sudo and su do not work together with consolekit
- consolekit does not work in case one opens a new session/xsession while being logged in remotely

cheers,
hal2050
Top
Post Reply

12 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic