Yep, on my box, I have my X session start for me, with a locked
screensaver starting on top of it. It's great so I can turn on my box, go
and get some food, and when I come back it will be ready to use.
I attached the file I use (tailor it to your needs). Put it in
/etc/init.d. You'll have to run:
update-rc.d startmyx defaults 99
It's a quick-and-dirty hack, but it's something to start with.
On Mon, Oct 11, 1999 at 12:14:06PM -0600, Mike Wood wrote:
>
> Currently I'm using a modified Login.app to provide a login screen
> for 7 public netscape terminals. I'm wondering if there is a way to have
> X start as the guest user at boot time. I've tried using 'su -c' in init
> but unfortunately that doesn't seem to quite work.
>
> Mike Wood mike@oa.net
> External Technical Manager OA Group of Companies
> 10503 Jasper Ave (780)-425-5151 ext 531
> Edmonton, Alberta (780)-425-3852 fax
> T5J 1Z5
>
>
--
"I already have all the latest software."
-- Laura Winslow, "Family Matters"
Dwayne Litzenberger - dlitz@cheerful.com
Advertising Policy: http://DLitzPower.tripod.com/spamoff.htm
GnuPG Public Key: http://DLitzPower.tripod.com/gpgkey.asc
Fingerprint: 0535 F7CF FF5F 8547 E5A5 695E 4456 FB6C BC39 A4B0
#!/bin/sh
# /etc/init.d/startmyx: start or stop primary user's X session
FLAGS="defaults 99"
set -e
PATH=/usr/local/bin:/usr/local/sbin:/usr/X11R6/bin:/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/X11R6/bin/startx
PIDFILE=/var/run/myx.pid
test -x $DAEMON || exit 0
case "$1" in
start)
sleep 8s
echo -n "Starting X session: startx"
cd ~dwon
/bin/su - dwon -c "/usr/X11R6/bin/startx -- :2 vt9" </dev/tty9 >/dev/tty9 2>/dev/tty9 & echo $! >$PIDFILE
echo "."
;;
restart)
/etc/init.d/startmyx stop
/etc/init.d/startmyx start
;;
stop)
echo -n "Stopping X session: startx"
kill `cat $PIDFILE` || echo -n " not running"
echo "."
;;
*)
echo "Usage: /etc/init.d/startmyx {start|stop|restart}"
exit 1
;;
esac
exit 0
Attachment:
pgpRfrloicjvM.pgp
Description: PGP signature