In this article, we will have explained the necessary steps to install and configure Remote Desktop (XRDP) on Ubuntu 18.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with
sudo privileges. All the commands in this tutorial should be run as a non-root user.
Xrdp is an open-source implementation of the Microsoft Remote Desktop Protocol (RDP) allowing you to graphically control a remote system. With RDP you can log in to the remote machine and create a real desktop session same as if you had logged in to a local machine.
Install Remote Desktop (XRDP) for Ubuntu
Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.
sudo apt update sudo apt upgrade sudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils
Step 2. Install Remote Desktop (XRDP) for Ubuntu Server 18.04.
Xrdp package is available in the default Ubuntu repositories. Run the following command to install it:
sudo apt install xrdp
You can verify that Xrdp is running by typing:
sudo systemctl status xrdp
Step 3. Configuring Xrdp.
For basic Xrdp connections, we only need to configure Xrdp to use Xfce. To do so open the following file:
sudo nano /etc/xrdp/xrdp.ini
Add the following line:
Save the file and restart the xrdp service:
sudo systemctl restart xrdp
Step 4. Allow RDP traffic through UFW Firewall.
Allow just RDP through the local firewall:
sudo ufw allow 3389/tcp
Step 5. Test RDP by connecting through RDP.
Connect via Remote Desktop on a Windows (Microsoft Remote Desktop Client) or through Remmina on Linux.
That’s all you need to do to install XRDP Remote Desktop on Ubuntu 20.04 LTS Focal Fossa. I hope you find this quick tip helpful. For further reading on XRDP, please refer to their official knowledge base. If you have questions or suggestions, feel free to leave a comment below.