Skip to content

How To Install XRDP (Remote Desktop) on Ubuntu 24.04 & 22.04

Advertisement

XRDP is a software that lets you use Remote Desktop Protocol (RDP) to connect to a computer. It runs on Linux and uses a DisplayLink device. The connection between the client and the server is secure with TLS encryption.

XRDP is simple to set up and customize on Ubuntu. You can also use a VNC server to access your Ubuntu remote desktop. Check out this tutorial on installing a VNC server on Ubuntu.

In this guide, we will show you how to install and set up XRDP on Ubuntu 24.04 and 22.04. We will also cover some common configuration tasks.

How To Install XRDP on Ubuntu: Step-by-Step

You need to have a Desktop Environment (X server) installed and running on your server. Additionally, you 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 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 
Installing XRDP on Ubuntu 22.04
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:

Installing XRDP on Ubuntu 22.04
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.

Installing XRDP on Ubuntu 22.04
XRDP Service Status

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

Installing XRDP on Ubuntu 22.04
Remote desktop connected

Now, you can manage your remote Ubuntu system graphically.

Conclusion

In conclusion, setting up XRDP on your Ubuntu system allows for a secure and efficient remote desktop connection using the Remote Desktop Protocol. By following this guide, you can easily install and configure XRDP on both Ubuntu 24.04 and 22.04. Make sure you have a Desktop Environment running on your server and the xrdp client software on your client computer. For those who prefer using a VNC server, you can also find a helpful tutorial to set it up on Ubuntu. With these tools, accessing and managing your Ubuntu desktop remotely becomes straightforward and convenient.

Rahul

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

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

Your email address will not be published. Required fields are marked *


Back to top