XRDP is a remote desktop service for the Linux X servers. That allows us to connect remote Linux desktop systems over Microsoft RDP (Remote Desktop Protocol). XRDP also supports two-way clipboard transfer (text, bitmap, file), audio redirection, and drive redirection (mount local client drives on the remote machines).
XRDP is an easy-to-install and configurable service for Ubuntu systems. But you can also use a VNC server to access the remote desktop of the Ubuntu systems. Find a tutorial to install a VNC server on Ubuntu systems.
This tutorial will provide you with the instructions to install the XRDP service on Ubuntu 22.04 Desktop systems.
Assuming you have a running Ubuntu system with a desktop installed. Now login to the system and open a terminal:
Step 1 – Installing XRDP on Ubuntu
The XRDP packages are already available under the default Apt repositories on Ubuntu systems. Use the following commands to install XRDP on Ubuntu system:
sudo apt update
sudo apt install xrdp -y
After installation completed, the XRDP service will be started automatically. You can check the status by executing the following command:
sudo systemctl status xrdp
The above output shows the Xrdp service is up and running.
Step 2 – Configuring XRDP
The installer will create a new account named “xrdp”. The xrdp session uses a certificate key file “/etc/ssl/private/ssl-cert-snakeoil.key”, which plays an important role with remote desktop.
In order to work it properly, add the xrdp user to the “ssl-cert” group with the following command.
sudo usermod -a -G ssl-cert xrdp
Restart the Xrdp service by running the command given below:
sudo systemctl restart xrdp
Step 3 – Configure System Firewall
The XRDP service listens on standard remote desktop port 3389. You need to adjust the firewall to allow access to port 3389 for the remote systems.
Systems running with a UFW firewall, use the following command to open port 3389 for the LAN network.
sudo ufw allow from 192.168.1.0/24 to any port 3389
Reload the UFW to apply the new rules.
sudo ufw reload
All right, Your system is ready to access over RDP protocol.
Step 4 – Connect to Remote Desktop
The Xrdp service is successfully installed and ready to connect. On your Windows client, open the RDP client and enter the IP address of the Ubuntu system.
On the Windows system launch the RDP client:
Once connected successfully, the remote system prompt for authentication. Enter the login credentials of the remote Ubuntu system to get remote desktop access.
On successful authentication, you’ll get access to Ubuntu remote desktop.
Now, you can manage your remote Ubuntu system graphically.
This tutorial helped you to install and configure XRDP on Ubuntu 20.04 desktop system. Now, you can manage your Ubuntu desktop system remotely.