Installing a graphical user interface on ubuntu enables you to have access to your server using a desktop environment. The experience you get is equivalent to more like running a physical computer with Ubuntu installed.
Now, for better server performance with smooth navigation throughout your machine, you will need to buy a good VPS machine with at least 2 vCPUs and 4GB RAM. I usually recommend Contabo VPS because it’s cheaper and reliable. Refer to the Contabo VPS pricing table below and you will be completely mind-blown with the amount of VPS resources they offer compared to other players in the industry;
Cloud VPS S
-
4 vCPU Cores
-
8 GB RAM
-
50 GB NVMe or 200 GB SSD
-
1 Snapshot
-
32 TB Traffic Bandwidth
-
Unlimited Incoming Traffic
Cloud VPS M
-
6 vCPU Cores
-
16 GB RAM
-
100 GB NVMe or 400 GB SSD
-
2 Snapshots
-
32 TB Traffic Bandwidth
-
Unlimited Incoming Traffic
Cloud VPS L
-
8 vCPU Cores
-
30 GB RAM
-
200 GB NVMe or 800 GB SSD
-
3 Snapshots
-
32 TB Traffic Bandwidth
-
Unlimited Incoming Traffic
Cloud VPS XL
-
10 vCPU Cores
-
60 GB RAM
-
400 GB NVMe or 1.6 TB SSD
-
4 Snapshots
-
32 TB Traffic Bandwidth
-
Unlimited Incoming Traffic
In my opinion, running your Ubuntu server with a graphical user interface on the Contabo platform will give you a flawless desktop experience when accessing your machine remotely.
Now, if you haven’t ordered your Contabo VPS server, you can start from here.
In this blog, I will walk you through how to install a graphical user interface on your Ubuntu server. And to cut the story short, let’s jump to it.
RECOMMENDED READING: How to download and install Ubuntu Linux on a Laptop
Install a remote Desktop Server on Ubuntu
A remote Desktop Server is an application we install on our remote Ubuntu server to enable us to access the graphical user interface using a remote desktop client on the local machine.
There are a couple of remote desktop servers out there, but in this article, we will install and use something called xrdp
Installing xrdp server on Ubuntu
An xrdp is an open-source application that makes the implementation of Microsoft’s Remote Desktop Protocol possible on other operating systems other than Windows like Linux distributions.
At this point, I’m assuming that your Ubuntu Linux server is up and running and that you have root access to it. So, before we install xrdp server and as a common culture with Linux, we need to update our system with the following command;
sudo apt-get update
Now that the system is up to date, let’s install xrdp server by running the following command;
sudo apt install xrdp
The xrdp service will start automatically. But let’s confirm if it’s truly working by running the following command;
sudo systemctl status xrdp
If it’s working, then you should be seeing active (running)
message on your terminal.
RECOMMENDED READING: How to easily Create and Add Users in Linux
Install Gnome on Ubuntu Server
Gnome provides a desktop graphical user environment for ubuntu and we can install it by running the following command;
sudo apt-get install ubuntu-gnome-desktop
During the process of installing Gnome, you will be prompted to upgrade some important packages, and so you will have to type y
, meaning yes to be able to continue. At this point, it can take a couple of minutes for all the necessary packages to be installed. I advise you to wait patiently for this process to complete.
Select a display manager
Gnome ships with a display manager and during the installation process, a screen will pop up so you can select the right display manager for your use. In this case, you need to select gdm3 which will offer you the full desktop experience of Ubuntu. So, select gdm3 as seen in the image below;
RECOMMENDED: How to install Ant Media Server on VPS
Install and configure the firewall on Ubuntu
When the installation of Gnome is complete, we need to open port 3389 for xrdp server to listen through the firewall;
Install iptables firewall
In this article, we’re using iptables firewall. You can use any other firewall you like as long as the applicable rules are implemented. And to install iptables firewall, use the following command;
sudo apt-get install iptables
Confirm if iptables firewall is active by running the following command;
systemctl status iptables
The first rule to implement is to enable port 22 for SSH access. This is important because if we don’t open it and the system abruptly shuts down, we’re going to be locked out forever. Use the following command to achieve this;
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
Now, let’s open 3389 to allow xdrp to listen through the firewall by running the following command;
sudo iptables -A INPUT -p tcp --dport 3389 -j ACCEPT
RECOMMENDED READING: How to use Alibaba Cloud Free credit to Set up Ubuntu server
Connecting to the Ubuntu server using an xrdp client.
If you’re using windows as your local machine, you can remotely connect to your Ubuntu server with a graphical user interface installed using the native Windows Remote Desktop Client as seen in the image below;
Enter your server login credentials
The login credentials you used to have SSH access to your machine are the same details you need to access your server’s desktop interface. This means that in the Windows Remote Desktop client, you will fill in as follow;
- Under computer name, fill in your server’s IP address
- Under user name, insert the same user name you used for SSH.
Press the save button so your credentials are saved on file and then hit connect . Finally, you will be prompted to insert your password, which is the same password you used for SSH connection.
That’s all and enjoy
More related articles to explore
- How can I install an Open SSH Server on Ubuntu Linux?
- How to host a Laravel application on Ubuntu using Apache
- How can I update Ant Media Server on Ubuntu?
- How to use Alibaba Cloud Free credit to Set up Ubuntu server
- How to install and configure UFW firewall on Ubuntu Linux
- How to set up Nginx RTMP Server on Ubuntu to Live stream videos
- How can I create FTP User Directory in Ubuntu?
- Step-by-Step Guide to Installing FTP on Ubuntu Server
- How to deploy WordPress on a Ubuntu LAMP Server
- How to deploy a MySQL Server on Ubuntu
- What is the easiest way to install Apache Server on Ubuntu?
- How to configure iptables to secure Apache server on Ubuntu
- How to enable root user on AWS ec2 Ubuntu Linux instance
- How to Install OpenVPN Server on Ubuntu
- How to install a Graphical User Interface on Ubuntu Server
- How to install Ant Media Server on Ubuntu Linux Server
- How to Dual Boot Kali Linux and Windows on a Laptop
- How to Install WordPress on a VPS Server using Cloudron?
- How to use the apt command in Linux | Syntaxes & Examples
- Is deploying and managing a VPS server hard?