Skip to content

Instantly share code, notes, and snippets.

@chrisloweau
Last active September 21, 2017 04:57
Show Gist options
  • Save chrisloweau/bcc6032db185098658a131418dc0bfe4 to your computer and use it in GitHub Desktop.
Save chrisloweau/bcc6032db185098658a131418dc0bfe4 to your computer and use it in GitHub Desktop.
VNC Server service script
#!/bin/bash
PATH="$PATH:/usr/bin/"
DISPLAY="1"
DEPTH="16"
GEOMETRY="1920x1080"
OPTIONS="-depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}"
case "$1" in
start)
/usr/bin/vncserver ${OPTIONS}
;;
stop)
/usr/bin/vncserver -kill :${DISPLAY}
;;
restart)
$0 stop
$0 start
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment