Skip to content

Instantly share code, notes, and snippets.

@daxdax89
Created December 11, 2018 02:48
Show Gist options
  • Save daxdax89/76d6118fe19977a6b2ed80a93de14044 to your computer and use it in GitHub Desktop.
Save daxdax89/76d6118fe19977a6b2ed80a93de14044 to your computer and use it in GitHub Desktop.
Steps--
1. Connect ssh to ec2 instance.
2. Become the super user after executing the command
sudo -s
3. Type the following commands to install vncserver:
sudo apt-get install ubuntu-desktop
sudo apt-get install vnc4server
sudo apt-get install gnome-panel
4. Type the command vncserver once.
5. Remember the password you use for accessing the vncserver. Kill vncserver by typing the command
vncserver-kill :1
6. Type vi .vnc/xstartup and modify the file
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
gnome-session –session=gnome-classic &
gnome-panel&
7. Press ESC, followed by :wq to save and exit the file
8. Type vncserver again to start vncserver.
9. Download and install tightvnc to connect remote desktop from the following link
http://www.tightvnc.com/download.php
10. Now run tightvnc viewer
11. Add the port no 5901 in your ec2 security group
12. Write your public ip in remote host text box and port no.
publicIp::port
13. Your desktop in ec2 instance is ready and execute the command vncserver after every restart.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment