You are not logged in.
Since the last consolekit upgrade you either need to log in manually or use a login manager that supports console-kit to have your session register properly with it (and be able to shut down/suspend/resume/... as a user).
However, when you set up your system to log in automatically (like I do with my HTPC running Xbmc), that doesn't seem to work anymore (the session is reported as not being local, and you're denied access to reboot/shutdown/etc.). Apparently that's due to using the inittab method (as said in the wiki entry on starting X). X is launched from .xinitrc, and through ck-launch-session.
Since I am not exactly looking to SSH into my HTPC every single time (or attach a keyboard, I have a remote for that thing) to log in manually and start X, or shut down over SSH, I was wondering if there was an autologin alternative to the inittab method - or a way to make console-kit accept the session as local. As I understand it there doesn't seem to be a way to tell console-kit to think differently on existing session except through program calls (e.g. you can't just prefix /usr/bin/xbmc with /usr/bin/console-kit-deamon like you can do with dbus-launch or ck-launch-session). I think GDM and KDM can be used for auto-login, but they're quite heavy (especially since Xbmc can run right on top of X, so there's no need for any WM/DE whatsoever). Xdm apparently seems unable to do auto-login (and doesn't support console-kit yet); Slim should support it, but doesn't provide console-kit support (yet) either.
Any pointers are appreciated. Ideally I'd like to do this without a login manager, of course. With 256 MB of RAM (AppleTV) every MB saved is welcome .
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Looks like this is another one for the list
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Same situation here, I've rolled consolekit back to the previous release for the time being.
You may have already seen it but Aphanic's posted (#36) a potential fix/workaround on this thread.
Offline
I added a note to the page a few days ago about the possibility of combining mingetty (has autologin) + the .bash_profile/.zprofile method. It works as well as the inittab one but you are properly logged in (locally) so consolekit works. Even `w` and `who` in a terminal won't show you as logged in when starting via inittab.
You'll also save some RAM by using mingetty (a few KB at least xD).
Here's what I use atm, it works fine with consolekit, although I don't actually use ck at the moment.
at the end of .zprofile:
if [[ -z $DISPLAY && $(tty) = /dev/tty2 ]]; then
exec xinit ~/.config/xinitrc -- /usr/bin/X -nolisten tcp vt08 &>/dev/null
fi
relevant section from inittab:
c2:2345:respawn:/sbin/mingetty --autologin thestinger tty2 linux
c3:2345:respawn:/sbin/mingetty --autologin thestinger --loginpause tty3 linux
c4:2345:respawn:/sbin/mingetty --autologin thestinger --loginpause tty4 linux
c5:2345:respawn:/sbin/mingetty --autologin thestinger --loginpause tty5 linux
c6:2345:respawn:/sbin/mingetty --autologin thestinger --loginpause tty6 linux
c7:2345:respawn:/sbin/mingetty --autologin thestinger --loginpause tty7 linux
Last edited by thestinger (2011-02-02 09:05:16)
Offline
the method described by testhinger works fine, thanks for sharing
Offline
Thanks thestinger, I'll try that this evening ^_^.
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
Well, that method works but even if you boot in runlevel3, X tries to start. And it's a little slower than inittab (.xinitrc) method on my pentium4 xbmc box (+2 seconds)... Meh, I want the old inittab back
.::. TigTex @ Portugal .::.
Offline
Thanks for the info thestinger!
@TigTex: to be able to use runlevel 3 as usual without starting X it might be interesting to parse the output of "who -r" and add another condition to the profile configuration file.
For example:
if [[ -z $DISPLAY && $(tty) = /dev/tty2 && `who -r | cut -c20` = 5 ]]; then
# Start X
fi
Offline
I don't use consolekit at all. I am not a 100% sure if i3 supports it or not, but I have always auto-logged-in using the inittab method and given NOPASSWD to reboot and shutdown through visudo. Hasn't given me any problems yet.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Same here with Openbox, sudo doesn't care about the consolekit stuff. Xbmc does though .
Edit: thanks thestinger, works excellently .
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline
just another method of starting XBMC without login manager:
# /etc/inittab
(...)
x:5:respawn:/bin/su alex -l -c "/bin/bash --login -c 'startx xbmc'>/dev/null 2>&1"
with following as .xinitrc:
#!/bin/sh
nvidia-settings -l
if [ "$2" == "xbmc" ]; then
# start XBMC
exec ck-launch-session /usr/bin/dbus-launch --exit-with-session /usr/bin/xbmc --standalone -fs
else
# start openbox session
exec ck-launch-session openbox-session
fi
The parameter for .xinitrc gives me the ability to quickly fire up an openbox session on my media pc, for browsing etc.
Maybe it's useful for someone
Offline
The issue is not about starting up without a login manager, but to do so and have it register with consolekit as a local session. I appreciate you're willing to help but it has nothing to do with the topic .
Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy
Offline