"Kenneth E. Lussier" wrote:
>
> Rob Yelle wrote:
> > in etc/inittab you set the default runlevel to id:5:initdefault: (from
> > id:3:initdefault: )
>
> Right, but how do I get it to log in automatically?
>
> Kenny
>
I have been able to autologin a system at work with the following entry
to /etc/inittab:
2:2345:respawn:/wxdisk/wxws/bin/autologin tty2 login -f wxws
1>/dev/console 2>&1
The autologin entry is a script that is as follows:
#!/bin/bash
exec 0</dev/$1 1>/dev/$1 2>&1
cat /etc/issue
shift
exec $*
$1 is tty2 (or the device to login to) and $2 is the user you want to
autologin (in this case 'wxws').
Make sure you have the following set in /etc/inittab also:
id:3:initdefault:
I know this does not start XDM. Use your .login file to do that for
you. Here's mine:
#!/bin/csh
# File: .login for Predictor System
setenv PATH ${PATH}:.:/wxdisk/wxws/wxws_exe:
setenv PATH ${PATH}/bin:/usr/bin:/usr/sbin:/etc:
setenv PATH ${PATH}/usr/local/bin:
setenv HZ 100
stty sane
stty echoe
stty erase '^H'
stty intr '^C'
source ~/.wwrc
cd wxws_exe
#AUTOstart the Predictor at boot time
#(but remember it may not be boot time!)
#if ($?CONSOLE || (-e /tmp/logged_in) || $?REMOTEUSER) then
if ((-e /tmp/logged_in) || $?REMOTEUSER) then
echo " "
else
date > /tmp/logged_in
echo "starting Predictor"
~/ww_startx &
xhost +
endif
Another way you can autologin a user is to set one of the entries in
inittab to as follows:
co:234:respawn:su - wxws -c /wxdisk/wxws/ww_startx >/dev/null 2>&1
</dev/null
This example actually comes from a Solaris x86 system I have at work.
The difference with this way of autostarting is that the console login
is not available, unlike the previous. The ww_startx script starts up X
and several other applications.
Here's the ww_startx that is referred to in both examples:
#!/bin/csh
#
# startup X11/Motif
#
ps -e | grep xinit >/dev/null
if ($status != 0) then
echo "Starting X11/Motif"
xinit
endif
Hope this helps,
Scott
--
_______________________________________________________________
Scott Mellott __o Clydesdale Cruiser
[EMAIL PROTECTED] -\<, http://scott.mellott.com
[EMAIL PROTECTED] (*)/(*) WSI Corporation
_______________________________________________________________
**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************