Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### BEGIN INIT INFO
- # Provides: vncserver
- # Required-Start: networking
- # Required-Stop:
- # Default-Start: 2 3 4 5
- # Default-Stop: 0 1 6
- # Short-Description: Starts VNC
- # Description:
- ### END INIT INFO
- export USER='pi'
- eval cd ~$USER
- # Check state
- case "$1" in
- start)
- su $USER -c '/usr/bin/vncserver :1 -geometry 1280x720 -depth 24'
- echo "Starting vncserver for $USER"
- ;;
- stop)
- pkill Xtightvnc
- echo "vncserver stopped"
- ;;
- *)
- echo "Usage: /etc/init.d/vncserver {start|stop}"
- exit 1
- ;;
- esac
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement