Created
September 11, 2018 17:05
-
-
Save pseudokool/c7707937f075dd74cfa905edc80de39b to your computer and use it in GitHub Desktop.
Revisions
-
pseudokool created this gist
Sep 11, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,51 @@ # Ubuntu 16.04 on AWS EC2 This guide enables desktop mode in Ubuntu 16.04 (Xenial Xerus) running off an AWS EC2. ## Setup * Launch an EC2 instance with Ubuntu 16.04 (should work on all versions greater too) * Ensure a security group is configured, that allows ingress on ports 22 (SSH) and 5901 (VNC, 5900+N, where N is the display number) * SSH into the instance, update the system, install the XFCE desktop and the lightweight VNC server: ``` sudo apt-get update sudo apt install xfce4 xfce4-goodies tightvncserver ``` * Now, initialize. Assign a password to login in via remote desktop. Finally, kill VNC server. ``` vncserver vncserver -kill :1 ``` * To reconfigure VNC: ``` mv ~/.vnc/xstartup ~/.vnc/xstartup.bak nano ~/.vnc/xstartup ``` * Add in the following to the _xstartup_ config. ``` #!/bin/bash xrdb $HOME/.Xresources startxfce4 & ``` * Make _xstartup_ an executable script and start the VNC server ``` sudo chmod +x ~/.vnc/xstartup vncserver ``` ## Connecting to the instance Once setup is complete, you can remote desktop into your instance with GUI. * On OS X, use screen sharing ``` vnc://<instance_ip>:5901 ``` * On Linux, use _krdc_, _remmima_ etc ## References * [EC2-VNC] (https://help.ubuntu.com/community/EC2-VNC) * [How to Install and Configure VNC on Ubuntu 16.04] (https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-16-04)