Lightweight xfce4 Setup for AWS t2.nano with Ubuntu image and remote tightVNC access

A good place to start reading and understanding what is needed for a GUI

My configuration is below for a minimum system that I consider to be a useable starting point.

sudo apt install xfce4 xfce4-goodies
sudo apt install tightvncserver
tightvncserver :1
sudo apt-get install gnome-icon-theme-full tango-icon-theme
sudo apt install gksu
sudo apt install synaptic
sudo apt install chromium-browser
sudo apt install gedit

open gedit and edit the file /usr/share/applications
change Exec= to “Exec=gksudo synaptic”

Total drive size is 2.144gb when run on the AWS Ubuntu image

Create a partition for the swap so applications have access to more RAM

sudo dd if=/dev/zero of=/mnt/swap.0 bs=1024 count=1048576
sudo mkswap /mnt/swap.0

Add to fstab to automatically mount the partition

sudo su 
echo "/mnt/swap.0 swap swap defaults 0 0" >> /etc/fstab
swapon /mnt/swap.0

Check your work

sudo swapon -s

How to setup lxde tightVNCserver on AWS t2.nano

This will install the most basic desktop environment without any browser or package managers etc. It’s very limited and in my opinion not worth the extra configuration to get it up and running.

# Make sure Debian is the latest and greatest

sudo apt update && sudo apt upgrade

# Install X, LXDE, VPN programs

sudo apt install xorg lxde-core tightvncserver

# Start VNC to create config file and setup your password

tightvncserver :1

# To stop VNC sever if needed

tightvncserver -kill :1

I did not need to follow these steps and tight VNC Server was working

# Edit config file to start session with LXDE: 
nano ~/.vnc/xstartup 

# Add this at the bottom of the file: 
lxterminal & 
/usr/bin/lxsession -s LXDE &