Ugacomp

How to install a Graphical User Interface on Ubuntu Server

Where necessary, you may need to have access to a VPS server so you can follow how to implement the steps in this article.  You can get a cheaper VPS Server from Contabo with 4vCPU cores, 8GM RAM, and 32TB Bandwidth for less than $5.50 per month. Get this deal here now

Table of Contents

Cloud VPS S

$5.50 Monthly
  • 4 vCPU Cores | 8GB RAM

CLOUD VPS M

$15.50 Monthly
  • 6 vCPU Cores | 16GB RAM

CLOUD VPS L

$17.50 Monthly
  • 8 vCPU Cores | 24GB RAM

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

$5.50 Monthly
  • 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

$12.50 Monthly
  • 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

$21.50 Monthly
  • 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

$40.00 Monthly
  • 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;

Gnome Display manager for Ubuntu server

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;

Windows Remote Desktop client to access Ubuntu Desktop remotely

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

Hire us to handle what you want

Hire us through our Fiverr Profile and leave all the complicated & technical stuff to us. Here are some of the things we can do for you:

  • Website migration, troubleshooting, and maintenance.
  • Server & application deployment, scaling, troubleshooting, and maintenance
  • Deployment of Kubernetes, Docker, Cloudron, Ant Media, Apache, Nginx,  OpenVPN, cPanel, WHMCS, WordPress, and more
  • Everything you need on AWS, IBM Cloud, GCP, Azure, Oracle Cloud, Alibaba Cloud, Linode, Contabo, DigitalOcean, Ionos, Vultr, GoDaddy, HostGator, Namecheap, DreamHost, and more.
 

We will design, configure, deploy, or troubleshoot anything you want. Starting from $10, we will get your job done in the shortest time possible. Your payment is safe with Fiverr as we will only be paid once your project is completed.