[ale] Auto Login

Geoffrey esoteric at 3times25.net
Wed Sep 25 11:20:42 EDT 2002


Come to think of it, I did this as well a while back, but just didn't 
think about it.  I would think it would be sufficient to place the 
following into /etc/rc.d/rc.local:

su - user2autologin -c "/usr/X11R6/bin/startx"

I did this for a standalone pc my wife used to run a slideshow for her 
classroom open house.


Michael D. Hirsch wrote:
> 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.
> 
> 


-- 
Until later: Geoffrey		esoteric at 3times25.net

I didn't have to buy my radio from a specific company to listen
to FM, why doesn't that apply to the Internet (anymore...)?


---
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