[plug] Linux auto login

Jason Smuts jason at mantacom.com
Mon Jan 13 12:55:36 WST 2003


Hi guys/gals,

I have been trying to get a linux box to automatically login as a
particular (non-root) user.  I have only very limited experience with
Linux so if anyone knows of some magic that could help me here ... 

Background:
~~~~~~~~~~~

Red Hat 7.3 on an AMPRO SBC with a 512Mb IDE SanDisk Compact Flash,
128Mb Ram, no swap.

I am building an embedded system (no keyboard, no mouse - just monitor &
touch screen - hence login not possible).  I would like the system to
start up, start X windows, and launch my custom X application.
Currently, I have to login manually, and type startx to get the thing
rolling.  The gui application loads automatically (from .xinitrc).  

The story so far:
~~~~~~~~~~~~~~~~~

A long time ago in a galaxy far, far away ...  
 
-<>- I currently have "id:3:initdefault" set in my /etc/inittab so it
boots to a text login.  I had no luck using 5: I got some kind of
endless waiting for X Server to start message.

-<>- I have placed the line: "exec ~/gui" in the user's ~/.xinitrc file.
This works.  As soon as I run 'startx' I get my gui application.  Now to
get X server to start automatically for a specific user when the system
boots.

-<>- I tried adding the line: 'x:3:respawn:/bin/su - myuser "startx"' to
my /etc/inittab file, but this did not work.  It yields the following
error message:  " Fatal server error:
   PAM authentication failed, cannot start X server.
   Perhaps you do not have console ownership? "

Fair 'nuff.  Now what?

Questions:
~~~~~~~~~~

1. Is this 'right' way to go about things?
2. Is there a 'standard' mechanism for auto-login? 
3. How do I get a script to run when a particular user logs in?  In my
case I would simply like to run 'startx' 
4. Have I lost my mind? 

Regards,

Jason.
Fremantle, WA.



More information about the plug mailing list