Advertisement
Guest User

/etc/init.d/vncserver

a guest
Aug 29th, 2015
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #!/bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: tightvncserver
  4. # Required-Start: $local_fs
  5. # Required-Stop: $local_fs
  6. # Default-Start: 2 3 4 5
  7. # Default-Stop: 0 1 6
  8. # Short-Description: Start/stop tightvncserver
  9. ### END INIT INFO
  10.  
  11. # More details see:
  12. # http://www.penguintutor.com/linux/tightvnc
  13.  
  14. ### Customize this entry
  15. # Set the USER variable to the name of the user to start tightvncserver under
  16. export USER='kamil'
  17. ### End customization required
  18.  
  19. eval cd ~$USER
  20.  
  21. case "$1" in
  22. start)
  23. su $USER -c '/usr/bin/tightvncserver :1'
  24. echo "Starting TightVNC server for $USER "
  25. ;;
  26. stop)
  27. pkill Xtightvnc
  28. echo "Tightvncserver stopped"
  29. ;;
  30. *)
  31. echo "Usage: /etc/init.d/vncserver {start|stop}"
  32. exit 1
  33. ;;
  34. esac
  35. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement