Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- ### BEGIN INIT INFO
- # Provides: VNC
- # Required-Start: $local_fs
- # Required-Stop:
- # Default-Start: 2 3 4 5
- # Default-Stop: 0 1 6
- # Short-Description: Start or stop the VNC server
- ### END INIT INFO
- PATH=/sbin:/usr/sbin:/bin:/usr/bin
- eval cd ~pi
- case "$1" in
- start)
- su pi -c "/usr/bin/vncserver :1 -geometry 1024x728 -depth 24"
- echo "Started VNC server."
- ;;
- stop)
- su pi -c "/usr/bin/vncserver -kill :1"
- echo "Stopped VNC server."
- ;;
- *)
- echo "Usage: vncserver [start|stop]" >&2
- exit 3
- ;;
- esac
- :
- # tohle zadat postupne v terminalu a pak to odsud smazat
- # sudo apt-get install tightvncserver
- # sudo nano /etc/init.d/vncserver
- # sudo chmod 755 /etc/init.d/vncserver
- # sudo update-rc.d vncserver defaults
- # sudo reboot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement