Created
August 19, 2016 14:37
-
-
Save biggers/be3fe912391ed56e511d675f75725cff to your computer and use it in GitHub Desktop.
x11vnc service start-up script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
VNC_SERVER=/usr/bin/x11vnc | |
VNC_DISPLAY=:0 | |
LOG_FILE=/tmp/x11vnc-run.log | |
case "$1" in | |
start|restart) | |
killall ${VNC_SERVER} | |
echo "Starting: ${VNC_SERVER} ${VNC_DISPLAY} on $(uname -n)..." | |
${VNC_SERVER} -bg -usepw -auth guess -nc -o ${LOG_FILE} -display ${VNC_DISPLAY} | |
echo $? | |
;; | |
stop) | |
echo "Stopping ${VNC_SERVER} ${VNC_DISPLAY} on $(uname -n)..." | |
killall ${VNC_SERVER} | |
echo $? | |
;; | |
*) | |
echo "USAGE: x11vnc.sh [start|stop|restart]" | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment