Linux VNC at Boot ?
cyonkers@intervis.com
cyonkers "at" intervis.com
Thu, 22 Jun 2000 20:38:15 +0000
> What do I put in the "/etc/rc.d/rc.local" script?
This is a script that I run in "/etc/rc.d/init.d that runs at boot time
creating vnc sessions for each user on the system. Just substitute
"username1", "username2", etc with the names of users on your
system.
There is probably a better way to do this but hey, I was in a hurry
to make it go.
Cheers,
Clement
---------------- start script ---------------------
#!/bin/sh
#
# vncserver This shell script is an attempt at starting
# several copies of vnc as each of the required
# users on the system using the proper
# display numbers.
#
# Source function library.
. /etc/rc.d/init.d/functions
# See how we were called.
case "$1" in
start)
# Clean up any crud
# This gets rid of old lock files hanging round
rm -f -r /tmp/.X*
# Start vncserver
echo -n "Starting vnc: "
su - username1 -c "vncserver :1"
echo
sleep 5
su - username2 -c "vncserver :2"
echo
sleep 5
su - username3 -c "vncserver :3"
echo
sleep 5
su - username4 -c "vncserver :4"
echo
sleep 5
touch /var/lock/subsys/vncserver
;;
stop)
# Stop vncserver
echo -n "Shutting down vnc: "
su - username1 -c "vncserver -kill :1"
su - username2 -c "vncserver -kill :2"
su - username3 -c "vncserver -kill :3"
su - username3 -c "vncserver -kill :4"
echo "done"
rm -f /var/lock/subsys/vncserver
;;
*)
echo "Usage: named {start|stop}"
exit 1
esac
exit 0
------------------- end script ----------------------
___________________________________________
'+$;%+$;'+$;%+$;'+$;%+$;'+$;%+$;'+$;%+$;'
___________________________________________
Clement A. Yonkers
Senior Producer
cyonkers "at" intervis.com
InterVision LTD
19 Church St. Suite 4
Burlington, VT 05401
http://www.intervis.com
http://www.digitalcoal.com
V: 802.860.1395 Ext. 11
F: 802.860.1571
What do computer engineers use for birth control? Their personalities.
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to majordomo "at" uk.research.att.com
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------