Automatic log-in in Linux

What is the easiest and most elegant way to log into a fluxbox session automatically (with no action necessary, no keypress or anything) on system startup as a certain user. [Edit 2] Not even a shell login should be necessary for the user, always the preset user should be logged in graphically. [/Edit 2]

There are some setups where this is nice.

(Please put remarks about whether this should be discussed at all or better kept secret to the other question: https://stackoverflow.com/questions/747008/is-it-good-to-make)

[EDIT 1]

How could I lock fluxbox immedeately then (using xtrlock) but at the same keep starting my favourite applications.

The result would be: I switch on the box, go and have breakfast, when I come back I unlock the box with my password (accepted by xtrlock) and everything is in place.

Is it impossible or how could it be done to break this scheme in "edit 1", imagine someone presses ctrl-c at the right time when fluxbox is coming up or whatever is possible. Or that person could use the mouse to klick somewhere in an application that start before xtrlock prevents it.

(I am aware of the fact that someone might see the contents of the screen but that would be ok for me.)

[/EDIT 1]


I suppose you use GDM login manager. In its configuration file /etc/gdm/gdm.conf enable autologin feature:

AutomaticLoginEnable=true
AutomaticLogin=karlthorwald

You can also define a timeout for automatic logins. Restart gdm and voilà!


You can also use rungetty. It is designed specifically as a getty replacement that 'runs' something. So, you can set it to startx, run fluxbox and what nots.