SHARE
TWEET

Create RDP using Digital Ocean

swtdahsatu Feb 9th, 2017 (edited) 997 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Make RDP with tightvnc Digital Ocean
  2.  
  3. Tutorial Video : https://youtu.be/K7p9ShJVb90 or http://www.dailymotion.com/video/x5b7efq
  4.  
  5. 1. Create Droplet
  6. - Register Here : https://m.do.co/c/87509e3e1bd1
  7. - Ubuntu 14.04.5 x64
  8. - minimal $10/month
  9. - Region Newyork
  10.  
  11. 2. Setting VPS
  12. - Download Putty : http://www.putty.org/
  13. - Login your VPS (check your IP and Password in your email)
  14.  
  15. root : enter
  16. oldpassword (right click) then enter
  17. re-oldpassword (right click) then enter
  18. newpassword (right click) then enter
  19. re-newpassword (right click) then enter
  20.  
  21. 3. setting vps part 2
  22. sudo apt-get update
  23. sudo apt-get install firefox gnome xfce4 xfce4-goodies tightvncserver
  24. vncserver
  25. **password for tightvnc**
  26. vncserver -kill :1
  27. nano ~/.vnc/xstartup
  28.  
  29. **remove the code and then, copy paste**
  30.  
  31. #!/bin/sh
  32. unset SESSION_MANAGER
  33. unset DBUS_SESSION_BUS_ADDRESS
  34. startxfce4&
  35.  
  36. [-x/etc/vnc/xstartup]&&exec/etc/vnc/xstartup
  37. [-r$HOME/.Xresources]&&xrdb$HOME/.Xresources
  38. xsetroot-solid grey
  39. vncconfig-iconic&
  40.  
  41. ctrl + x, Y, enter
  42.  
  43. 4. setting vps part 3
  44. sudo nano /etc/init.d/vncserver
  45.  
  46. **copy paste this code**
  47.  
  48. #!/bin/bash
  49. unset VNCSERVERARGS
  50. VNCSERVERS=""
  51. [ -f /etc/vncserver/vncservers.conf ] && . /etc/vncserver/vncservers.conf
  52. prog=$"VNC server"
  53. start() {
  54. . /lib/lsb/init-functions
  55. REQ_USER=$2
  56. echo -n $"Starting $prog: "
  57. ulimit -S -c 0 >/dev/null 2>&1
  58. RETVAL=0
  59. for display in ${VNCSERVERS}
  60. do
  61. export USER="${display##*:}"
  62. if test -z "${REQ_USER}" -o "${REQ_USER}" == ${USER} ; then
  63. echo -n "${display} "
  64. unset BASH_ENV ENV
  65. DISP="${display%%:*}"
  66. export VNCUSERARGS="${VNCSERVERARGS[${DISP}]}"
  67. su ${USER} -c "cd ~${USER} && [ -f .vnc/passwd ] && vncserver :${DISP} ${VNCUSERARGS}"
  68. fi
  69. done
  70. }
  71. stop() {
  72. . /lib/lsb/init-functions
  73. REQ_USER=$2
  74. echo -n $"Shutting down VNCServer: "
  75. for display in ${VNCSERVERS}
  76. do
  77. export USER="${display##*:}"
  78. if test -z "${REQ_USER}" -o "${REQ_USER}" == ${USER} ; then
  79. echo -n "${display} "
  80. unset BASH_ENV ENV
  81. export USER="${display##*:}"
  82. su ${USER} -c "vncserver -kill :${display%%:*}" >/dev/null 2>&1
  83. fi
  84. done
  85. echo -e "\n"
  86. echo "VNCServer Stopped"
  87. }
  88. case "$1" in
  89. start)
  90. start $@
  91. ;;
  92. stop)
  93. stop $@
  94. ;;
  95. restart|reload)
  96. stop $@
  97. sleep 3
  98. start $@
  99. ;;
  100. condrestart)
  101. if [ -f /var/lock/subsys/vncserver ]; then
  102. stop $@
  103. sleep 3
  104. start $@
  105. fi
  106. ;;
  107. status)
  108. status Xvnc
  109. ;;
  110. *)
  111. echo $"Usage: $0 {start|stop|restart|condrestart|status}"
  112. exit 1
  113. esac
  114.  
  115. ctrl + x, Y, enter
  116.  
  117. Setting VPS part 4
  118. chmod +x /etc/init.d/vncserver
  119. mkdir -p /etc/vncserver
  120. nano /etc/vncserver/vncservers.conf
  121.  
  122. **copy paste this code**
  123.  
  124. VNCSERVERS="1:root"
  125. VNCSERVERARGS[1]="-geometry 1024x768"
  126.  
  127. ctrl + x, Y, enter
  128.  
  129. sudo chmod +x /etc/init.d/vncserver
  130. sudo service vncserver start
  131. sudo update-rc.d vncserver defaults
  132. reboot
  133.  
  134. 5. Download TightVNC : http://www.tightvnc.com/
  135. - When Install, Choose Custom, Disable Server
  136.  
  137. 6. Open RDP using TightVNC
  138. - login IP with ::5901
  139. - example, 123.45.678.90::5901
  140.  
  141. 7. Done
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top