You are not logged in.

#1 2012-07-05 20:26:36

Registered: 2010-10-31
Posts: 56

[SOLVED] The proper way: autologin + console kit session registration

Hello *,

with upgraded util-linux to 2.21.2-3 "login -f tux" behaves different from before, so that a console kit session don't get registered in the same way as with manual "login tux".

I use "login -f tux" in /etc/inittab for automatic login in a specified console. tux's .bash_profile looks out for this specific console and may starts X. With the mentioned package update the console kit session doesn't get active for the X11 display anymore.

I like KISS and so don't want to use a display manager or manual login.

What I discovered also is, that the tty's got "mixed up". Before the update: automatic login on tty3 and X on tty4. After the update: automatic login and also X on tty3. Maybe related?

Any ideas or solutions? Thanks!!!

Last edited by ctxfi-user (2012-07-05 21:26:27)


#2 2012-07-05 20:49:32

From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [SOLVED] The proper way: autologin + console kit session registration … al_console

Personally I like the C login method. Here's my /etc/inittab:


su:S:wait:/sbin/sulogin -p

# c1:2345:respawn:/sbin/agetty -8 -s 38400 tty1 linux
c1:2345:respawn:/sbin/agetty --noclear -n -l /usr/local/sbin/autologin -s 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

Only 3 tty's because I don't like coping a feel in the dark for the F7 key (black keyboard here).

And ~/.bash_profile:

if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then

The ConsoleKit session is started from ~/.xinitrc. For example:

exec ck-launch-session gnome-session
exec startxfce4 --with-ck-launch
exec ck-launch-session dbus-launch openbox-session
...   Read the wiki page for your DE/WM.

"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).


#3 2012-07-05 21:25:28

Registered: 2010-10-31
Posts: 56

Re: [SOLVED] The proper way: autologin + console kit session registration

Thanks DSpider! I have it a bit more KISS and just found a workaround.

First the initial situation:

My inittab. tty1 remains untouched for the boot messages (fast SSD). Only one console on tty2. And automatic login on tty3.




#c1:2345:respawn:/sbin/agetty -8 -s 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
#c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux
#c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux
#c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux
#c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux


x:5:respawn:/bin/login -f tux </dev/tty3 &>/dev/tty3


Empty /home/tux/.hushlogin suppress welcome message. And added to .bash_profile:


[[ $(tty) = "/dev/tty3" ]] && exec startx </dev/null &>/dev/null


Side-effect since util-linux package update:

The mentioned "mixed up" tty's. With the above setup tty3 is used for the automatic login and for X. There is missing a switch to virtual terminal tty3. That seems to be the problem. You don't have that situation, because you autologin from tty1.


Either: Use tty1 for automatic login (change login-line in inittab and startx-line in .bash_profile).

Or: Tell X which virtual terminal to use in .bash_profile:


[[ $(tty) = "/dev/tty3" ]] && exec startx -- vt4 </dev/null &>/dev/null



Board footer

Powered by FluxBB