Skip to content

Instantly share code, notes, and snippets.

@danmactough
Last active January 4, 2016 17:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danmactough/8656593 to your computer and use it in GitHub Desktop.
Save danmactough/8656593 to your computer and use it in GitHub Desktop.

On your EC2 server:

sudo apt-get update
sudo apt-get install ubuntu-desktop

Reboot your server

On your EC2 server:

sudo apt-get install tightvncserver
vncserver :1

You will be prompted for a password.

Optionally (if you hate the Ubuntu Unity desktop), on your EC2 server:

# Stop the vncserver
vncserver -kill :1

sudo apt-get install gnome-session-fallback

vim .vnc/xstartup
# This is the vncserver startup script.
# Edit the last line to read:
# /etc/X11/Xsession gnome-session-fallback
# Type :wq to save and quit vim

# Restart the vncserver
vncserver :1

On your Mac

  • Create an ssh tunnel
ssh -N -L 5901:localhost:5901 -i <path to your PEM file> ubuntu@<your-ec2-server-ip>
  • Open Finder
  • Under the Go menu, select "Connect to Server..."
  • For the Server Address, enter: vnc://localhost:5901
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment