Install remote desktop (xrdp) on linux ubuntu 22.04; Through this tutorial, we will learn how to install and configure XRDP (remote desktop) on linux ubuntu 22.04 system.
xrdp is a free and open-source implementation of Microsoft RDP (Remote Desktop Protocol) server that enables operating systems other than Microsoft Windows (such as Linux and BSD-style operating systems) to provide a fully functional RDP-compatible remote desktop experience.
How to Install Remote Desktop (xrdp) on Ubuntu 22.04
Follow the following steps to install XRDP (remote desktop) on linux ubuntu 22.04 system:
- Step 1 – Update System Dependencies
- Step 2 – Install XRDP
- Step 3 – Configure XRDP
- Step 4 – Configure System Firewall
- Step 5 – Connect to Remote Desktop
Step 1 – Update System Dependencies
First of all, open terminal and execute the following command on command line to update system dependencies:
sudo apt update
Step 2 – Install XRDP
Then execute the following commands to install XRDP on Ubuntu system:
sudo apt install xrdp -y
After installation; we can use the following command to check the status:
sudo systemctl status xrdp
Step 3 – Configure XRDP
The xrdp session uses a certificate key file “/etc/ssl/private/ssl-cert-snakeoil.key”, which plays an important role with remote desktop. So, use the following command to create it:
sudo usermod -a -G ssl-cert xrdp
And restart the Xrdp service by executing the following command:
sudo systemctl restart xrdp
Step 4 – Configure System Firewall
The XRDP service listens on standard remote desktop port 3389. And if we need to adjust the firewall to allow access to port 3389 for the remote systems.
Then execute the following command on command line 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
Step 5 – Connect to Remote Desktop
- Now, On the Windows system launch the RDP client
- Once the rdp client connected successfully, the remote system prompt for authentication. Enter the login credentials of the remote Ubuntu system to get remote desktop access.
- Once the successful authentication, we will get access to Ubuntu remote desktop.
Through this tutorial, we have learned how to install and configure XRDP on Ubuntu 20.04 desktop system.