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.
The following commands used to install Ubuntu Desktop on Server.
Unity (The Default Desktop)
sudo apt-get install ubuntu-desktop
KDE
sudo apt-get install kubuntu-desktop
LXDE (Lubuntu)
sudo apt-get install lubuntu-desktop
MATE
sudo apt-get install mate-desktop
Gnome
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.
ubuntu@oracle-test-suite:~$ sudo add-apt-repository ppa:gnome3-team/gnome3-staging
ubuntu@oracle-test-suite:~$ sudo add-apt-repository ppa:gnome3-team/gnome3
And then install it:
ubuntu@oracle-test-suite:~$ sudo apt-get update && sudo apt install gnome gnome-shell
ubuntu@oracle-test-suite:~$ sudo apt install ubuntu-gnome-desktop
Checking availability from default sources
ubuntu@oracle-test-suite:~$ sudo apt-cache policy ubuntu-gnome-desktop ubuntu-gnome-desktop: Installed: 0.58.3 Candidate: 0.58.3 Version table: *** 0.58.3 500 500 http://phx-ad-3.clouds.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages 100 /var/lib/dpkg/status 0.58 500 500 http://phx-ad-3.clouds.archive.ubuntu.com/ubuntu 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.
ubuntu@oracle-test-suite:~$ sudo apt install xrdp
You will be then informed about the package size. To proceed with the installation, press Y
Once the installation is done, enable it.
ubuntu@oracle-test-suite:~$ 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
ubuntu@oracle-test-suite:~$ 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
ubuntu@oracle-test-suite:~$ echo xfce4-session >~/.xsession
Restart the xrdp service by issuing the following command
ubuntu@oracle-test-suite:~$ sudo service xrdp restart
Firewall
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.