How to install VNC on Ubuntu?
1. 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.
Please note: See this wiki for advanced configurations. Download and install a VNC client on your local system. See RealVNC Viewer. |
How to install a Gnome or XFCE4 desktop on Ubuntu for VNC?
There are multiple desktop environments available to use with VNC, here we describe how to install Gnome or XFCE4.
Gnome
1. Install the Gnome desktop environment on your instance.
Please note: Do not install the ubuntu-gnome-desktop package. Doing so will install other unnecessary packages that will permanently break your instance. |
2. Start a VNC server session (with a (barebones) gnome-shell).
3. 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.
XFCE4
1. In order to create a xfce4 environment, install XFCE desktop environment on your instance:
sudo apt-get install -y xfce4 sudo apt-get install -y xfce4-terminal # The update-alternatives fixes the terminal icon on the desktop sudo update-alternatives --set x-terminal-emulator /usr/bin/xfce4-terminal.wrapper
2. Start a VNC server session:
vncserver :1 -xstartup startxfce4
3. 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