How to Install Ubuntu Desktop GUI on Server

Ubuntu Desktop includes a graphical user interface. In this article, you’ll learn all about the Ubuntu Desktop installation and connect using a remote desktop client. Ubuntu has several desktop environments available in its repositories.

Install Ubuntu Desktop

Install Ubuntu Desktop

The following commands used to install Ubuntu Desktop on Server.

Unity (The Default Desktop)
sudo apt-get install ubuntu-desktop

sudo apt-get install kubuntu-desktop

LXDE (Lubuntu)
sudo apt-get install lubuntu-desktop

sudo apt-get install mate-desktop

sudo apt-get install ubuntu-gnome-desktop

XFCE (Xubuntu)
sudo apt-get install xubuntu-desktop

Please make sure you have the desktop repositories installed. For example, you need to add gnome repositories.

[email protected]:~$ sudo add-apt-repository ppa:gnome3-team/gnome3-staging
[email protected]:~$ sudo add-apt-repository ppa:gnome3-team/gnome3

And then install it:

[email protected]:~$ sudo apt-get update && sudo apt install gnome gnome-shell
[email protected]:~$ sudo apt install ubuntu-gnome-desktop

Checking availability from default sources

[email protected]:~$ sudo apt-cache policy ubuntu-gnome-desktop
Installed: 0.58.3
Candidate: 0.58.3
Version table:
*** 0.58.3 500
500 xenial-updates/universe amd64 Packages
100 /var/lib/dpkg/status
0.58 500
500 xenial/universe amd64 Packages

Install XRDP Package from Ubuntu Repository

xrdp Server is an open-source remote desktop protocol server which uses RDP to present a GUI to the client. It provides a fully functional Linux terminal server, capable of accepting connections from rdesktop, freerdp, and Microsoft’s own terminal server / remote desktop clients.

Install and Enable Xrdp

Login your ubuntu server.

[email protected]:~$ sudo apt install xrdp
xrdp Installation

XRDP Install

You will be then informed about the package size. To proceed with the installation, press Y

Once the installation is done, enable it.

[email protected]:~$ sudo systemctl enable xrdp

When done, you need to install an alternate desktop environment. In our scenario, we are using xfce4

Install xfce4 Desktop environment

[email protected]:~$ sudo apt-get install xfce4

You will be then informed about the package size. To proceed with the installation, press Y


Configure xrdp to use xfce desktop environment

you have to configure your Ubuntu server for xrdp to know that the xfce desktop will be used instead of the Unity or Gnome.
To configure this, from the terminal console, you will issue the following command

[email protected]:~$ echo xfce4-session >~/.xsession

Restart the xrdp service by issuing the following command

[email protected]:~$ sudo service xrdp restart


You should check the xrdp port 3389 is enabled in firewall. To see current firewall settings use sudo ufw status verbose, or iptables -L.

sudo ufw disable # To disable the firewall
sudo ufw enable # To enable the firewall

Test your Ubuntu Desktop connections using windows remote desktop.