o7planning

Install GUI and VNC for Ubuntu Server

  1. Install GUI for Ubuntu Server
  2. Install VNC Server
  3. Install VNC Viewer (VNC Client)

1. Install GUI for Ubuntu Server

After being installed, Linux Servers have no user interface. In the post, I will show you the way to install XFCE4, this is a lightweight graphical user interface but it is friendly to the majority of users.
Note: In case I use PuTTY to connect it to Unbuntu Server and execute commands to install XFCE4. You can execute direct commands on Ubuntu Server.
You can see more about PuTTY here:
Open PuTTY and connect to Ubuntu Server.
We have direct XFCE installing packages from Unbuntu's Software Repositories.
Run command:
sudo apt-get update
Next, running the command to install XFCE:
sudo apt-get install xfce4 xfce4-goodies
If you get the "Unable to locate package xfce4" error message, you need to add universe repository to your system:
sudo add-apt-repository universe

sudo apt update
After being installed, XFCE will takes about 523MB, pressing Enter to confirm the installing
XFCE is being installed:
XFCE has been installed successfully.

2. Install VNC Server

Install VNC Server:
sudo apt-get install tightvncserver
Next, you need to run VNC Server on Ubuntu. Then, installing VNC Client to your computer to be able to talk with VNC-Server. At that time, you can work with Ubuntu Server having the XFCE graphical user interface.
Running command:
vncserver
If you get "Could not open default font 'fixed'" error message, please install xfonts-base on your system.
sudo apt-get install  xfonts-base
Restart Ubuntu Server.
Enter password (a maximum length of 8 characters):
An object "VNC Server" is running and it is waiting for the client which connects to. The object is listening at the exended port :1.
You can create another object "VNC Server", it will listening to at the extended port :2
Using the command below to kill one object "VNC Server" having the extendes port :2.
vncserver -kill :2

3. Install VNC Viewer (VNC Client)

VNC Viewer is a VNC Client which supports you in connect to VNC Server and controll Ubuntu Server.
Firstly, you need to download VNC-Viewer.
The result of download:
VNC-Viewer can run directly without installing.
Create a connection to VNC Server:
Connect to VNC-Server via the extended port :1
A connection is created, double-click on it to access to Ubuntu Server.
Now you have connected to Ubuntu Server, and you can use graphical user interface to work with it.