Skip to content

Instantly share code, notes, and snippets.

@anaynayak
Created March 27, 2014 19:45
Show Gist options
  • Save anaynayak/9816524 to your computer and use it in GitHub Desktop.
Save anaynayak/9816524 to your computer and use it in GitHub Desktop.
#!/bin/sh
# /etc/init.d/tightvncserver
VNCUSER='pi'
case "$1" in
start)
su $VNCUSER -c '/usr/bin/tightvncserver :1'
echo "Starting TightVNC Server for $VNCUSER "
;;
stop)
pkill Xtightvnc
echo "TightVNC Server stopped"
;;
*)
echo "Usage: /etc/init.d/tightvncserver {start|stop}"
exit 1
;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment