XRDP is a client-server application that uses the Remote Desktop Protocol (RDP) as its transport protocol.
The server is implemented as a Linux daemon running on top of a DisplayLink device. The communication between the server and the client is encrypted using TLS.

Advertisement

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.

In this article, we will show you how to install and configure XRDP on Ubuntu 22.04. We will also walk you through a few common configuration tasks.

Prerequsities

You need an X server (Desktop Environment) that is installed on your server and running. You also need to install the xrdp (X Remote Desktop Protocol) client software on your client computer.

Step 1 – Installing XRDP on Ubuntu

The installation of XRDP on Ubuntu 22.04 is straightforward. The package is available in the official repositories, so we can simply install it with the apt package manager.

sudo apt update 
sudo apt install xrdp -y 

Once the installation is successfully finished, the XRDP service will be started automatically. You can check the status by executing the following command:

sudo systemctl status xrdp 
Installing XRDP on Ubuntu 22.04
Check XRDP service

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 desktops.

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 
Open port 3389 using ufw

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:

Launch 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.

XRDP Service Status

On successful authentication, you’ll get access to Ubuntu remote desktop.

Remote desktop connected

Now, you can manage your remote Ubuntu system graphically.

Conclusion

This article shows you how to install and configure a lightweight and secure remote desktop client and access program on a variety of Linux distributions. You can use XRDP as a replacement for PPP (Point-to-Point), SSH, and VNC remote desktop clients. As with most Linux applications, XRDP is available via the official package management system of your distribution. With a few tweaks, you can have XRDP up and running in less than 15 minutes.

Share.

14 Comments

  1. Thank a lot. When you finally install the xrdp and configure the FW, a reboot is a good idea for ensure that services are working OK and RDP connection work properly.

  2. On Xubuntu 22.10, after username and password, the screen goes black and session closes. looking at the status xrdp command, it shows I connect and no errors… ;( Any direction on this?

  3. Do you have a guide to generate and replace the invalid SSL certificate that the Ubuntu server generates? It just says localhost@localhost. I would love to generate and replace that SSL cert with an updated self-signed one.

Leave A Reply

Exit mobile version