Created
January 19, 2015 05:39
-
-
Save taka-wang/e023079f9f62823a1d42 to your computer and use it in GitHub Desktop.
Install vncserver on raspberry pi
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
sudo apt-get install tightvncserver | |
sudo nano /etc/init.d/tightvncserver | |
sudo chmod 755 /etc/init.d/tightvncserver | |
sudo update-rc.d tightvncserver defaults | |
# run tightvncserver |
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
#sudo nano /etc/init.d/tightvncserver | |
### BEGIN INIT INFO | |
# Provides: tightvnc | |
# 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 as a service | |
# Description: Start VNC Server as a service. | |
### END INIT INFO | |
#!/bin/sh | |
# /etc/init.d/tightvncserver | |
# Customised by Stewart Watkiss | |
# Set the VNCUSER variable to the name of the user to start tightvncserver under | |
VNCUSER='pi' | |
eval cd ~$VNCUSER | |
case "$1" in | |
start) | |
su $VNCUSER -c '/usr/bin/tightvncserver :1' | |
echo "Starting TightVNC server for $VNCUSER " | |
;; | |
stop) | |
pkill Xtightvnc | |
echo "Tightvncserver 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