[ale] Auto Login
Michael D. Hirsch
mhirsch at nubridges.com
Wed Sep 25 10:26:45 EDT 2002
On Tuesday 24 September 2002 09:32 pm, H. Bieber wrote:
> Can someone tell me how to setup a Linux box that auto logs in? We are
> creating a stand alone web browsing PC that wil be running RH 7.3, and
> Mozilla in Kiosk mode. We want a generic user with no rights to get auto
> logged in when the machine is booted. It would be even better if we
> could auto login and launch a program (mozilla).
Funny you should ask. I had to do this a couple of weeks ago, so it is still
fresh in my mind. You could use gdm or kdm to do this, but you may not want
the overhead. Here is what I did. I followed the instructions I found on
the Linux Gazette: http://www.linuxgazette.com/issue72/chung.html
To automatically boot and start up X windows as user "monitor" compile this
program named autologin:
int main() {
execlp( "login", "login", "-f", "monitor", 0);
}
and put these lines in /etc/inittab:
# start up X as the "monitor" user
1:2345:respawn:/sbin/agetty -n -l /usr/local/sbin/autologin 38400 tty1
This logs in the monitor user.
In the .bash_profile of the monitor user we have these lines:
if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then
startx
fi
so X starts automatically. .Xclients-default has whichever commands you want
to run in X (xterms, window managers, etc). Note that this was a very small
Redhat install. Other systems may use another file other than .Xclients for
the X startup script.
Hope that helps,
--Michael
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list