How to install a Gnome desktop on Ubuntu?
1. Install the Gnome desktop environment on your instance.
sudo apt update && sudo apt install gnome-shell -y
Do not install the ubuntu-gnome-desktop package. Doing so will install other unnecessary packages that will permanently break your instance.
2. Create a security group rule for TCP for VNC ports 5900-5910 and add it to your instance. See the security group guide here.
3. Install a VNC server on your instance.
sudo apt install tigervnc-standalone-server -y
See this wiki for advanced configurations.
Download and install a VNC client on your local system. See RealVNC Viewer.
4. Start a VNC server session.
- Killing your VNC session is done with
vncserver -kill :1
5. Connect to your desktop using the information provided by the VNC server command.
For example, you should see a port number that you can connect to.
vncext: Listening for VNC connections on local interface(s), port 5901