Advertisement
didyouknowthat

VNC Boot

Nov 22nd, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #!/bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: VNC
  4. # Required-Start: $local_fs
  5. # Required-Stop:
  6. # Default-Start: 2 3 4 5
  7. # Default-Stop: 0 1 6
  8. # Short-Description: Start or stop the VNC server
  9. ### END INIT INFO
  10.  
  11. PATH=/sbin:/usr/sbin:/bin:/usr/bin
  12.  
  13. eval cd ~pi
  14.  
  15. case "$1" in
  16. start)
  17. su pi -c "/usr/bin/vncserver :1 -geometry 1024x728 -depth 24"
  18. echo "Started VNC server."
  19. ;;
  20. stop)
  21. su pi -c "/usr/bin/vncserver -kill :1"
  22. echo "Stopped VNC server."
  23. ;;
  24. *)
  25. echo "Usage: vncserver [start|stop]" >&2
  26. exit 3
  27. ;;
  28. esac
  29.  
  30. :
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement