Slackware vncserver start/boot script
Anyone have a boot script for vncserver on slackware. I've been trying to write my own but I have not gotten it to work. When I execute vncserver directly, I get a normal KDE screen but when I run the script I created, it doesn't work. (Obviously "someusername" is substituted for a user on my linux box).
Here's the script:
#!/bin/sh
# Start/stop/restart the VNC server.
vnc_start(){
echo "Starting VNC Server..."
/bin/su someusername -c "/usr/local/bin/vncserver :2"
}
vnc_stop(){
echo "Stopping VNC Server..."
/bin/su someusername -c "/usr/local/bin/vncserver -kill :2"
}
vnc_restart() {
vnc_stop
sleep 1
vnc_start
}
case "$1" in
'start')
vnc_start
;;
'stop')
vnc_stop
;;
'restart')
vnc_restart
;;
*)
echo "usage $0 start|stop|restart"
esac
|