By default, Ubuntu Server does not include a Graphical User Interface (GUI). A GUI takes up system resources (memory and processor) that are used for server-oriented tasks. However, certain tasks and applications are more manageable and work better in a GUI environment. If GNOME is already installed on your Ubuntu server and you have access to the GUI through the console, but to have access remotely, you must install a service like xRDP.
If you installed a GUI environment on your ubuntu server, terminal window is not the best bet for you. Rather you can make similer functionality just like RDP in Windows. Seems to be exciting right? In this guide, we will talk about installing xRDP on ubuntu Linux VPS server to work like RDP.
xRDP is a Remote Desktop Protocol (RDP) service that allows RDP clients to your Linux VPS with GUI.
How to install xRDP on Ubuntu server?
Start by upgrading your server using the update command to make sure you’re using the latest software packages.
sudo apt-get update && sudo apt-get upgrade
Install xRDP packages using the following command.
sudo apt-get install xrdp -y
Allow the RDP default port on Ubuntu Uncomplicated firewall.
sudo ufw allow 3389/tcp
Make the polkit configuration file.
sudo nano /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf
Paste the following texts in the config file, save and exit the nano editor.
polkit.addRule(function(action, subject) { if ((action.id == “org.freedesktop.color-manager.create-device” || action.id == “org.freedesktop.color-manager.create-profile” || action.id == “org.freedesktop.color-manager.delete-device” || action.id == “org.freedesktop.color-manager.delete-profile” || action.id == “org.freedesktop.color-manager.modify-device” || action.id == “org.freedesktop.color-manager.modify-profile”) && subject.isInGroup(“{group}”)) { return polkit.Result.YES; } });
Lastly restart the xRDP service.
sudo /etc/init.d/xrdp restart
If everything is fine, you should be able to connect your Linux VPS using RDP client. After you logged in to the remote environment, you will see some options for connection. Select the “Xorg” option, and enter the username and password of sudo user.