Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/sh
- # /etc/init.d/vncboot
- ### BEGIN INIT INFO
- # Provides: vncboot
- # Required-Start: $remote_fs $syslog
- # Required-Stop: $remote_fs $syslog
- # Default-Start: 2 3 4 5
- # Default-Stop: 0 1 6
- # Short-Description: Start VNC Server at boot time
- # Description: Start VNC Server at boot time.
- ### END INIT INFO
- #USER=parrot
- #HOME=/home/parrot
- USER=root
- HOME=/root
- DISPLAY=1
- export USER HOME
- case "${1}" in
- start)
- echo "Starting VNC Server"
- #Insert your favoured settings for a VNC session
- su - $USER -c "/usr/bin/vnc4server :${DISPLAY} -geometry 1366x768 -depth 24 -pixelformat rgb565"
- ;;
- stop)
- echo "Stopping VNC Server"
- /usr/bin/vnc4server -kill :${DISPLAY}
- echo
- ;;
- restart)
- ${0} stop
- sleep 0.3
- ${0} start
- ;;
- *)
- echo "Usage: /etc/init.d/vncboot {start|restart|stop}"
- exit 1
- ;;
- esac
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement