TutorialsUbuntuUbuntu Based

How To Install Xrdp on Ubuntu 22.04 LTS

Install Xrdp on Ubuntu 22.04

In this tutorial, we will show you how to install Xrdp on Ubuntu 22.04 LTS. For those of you who didn’t know, Xrdp is an open-source remote desktop protocol server that provides a graphical user interface to remote machines using RDP (Microsoft Remote Desktop Protocol). Xrdp can connect to a locally created X.org session with the xorgxrdp drivers, to a VNC X11 server, and forward to another RDP server.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the Xrdp open-source remote desktop protocol on Ubuntu 22.04 (Jammy Jellyfish). You can follow the same instructions for Ubuntu 22.04 and any other Debian-based distribution like Linux Mint, Elementary OS, Pop!_OS, and more as well.

Prerequisites

  • A server running one of the following operating systems: Ubuntu 22.04, 20.04, and any other Debian-based distribution like Linux Mint.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install Xrdp on Ubuntu 22.04 LTS Jammy Jellyfish

Step 1. First, make sure that all your system packages are up-to-date by running the following apt commands in the terminal.

sudo apt update
sudo apt upgrade

Step 2. Installing Xrdp on Ubuntu 22.04.

By default, the Xrdp is available on Ubuntu 22.04 base repository. Now run the following command below to install the latest version of Xrdp to your Ubuntu system:

sudo apt install xrdp

After successfully installation, enable Xrdp (to start automatically upon system boot), start, and verify the status using the commands below:

sudo systemctl enable xrdp
sudo systemctl start xrdp
sudo systemctl status xrdp

Step 3. Configure Xrdp.

Note that the Xrdp service often uses a certificate stored in the /etc/ssl/ directory called ssl-cert-snakeoil.key. The Xrdp user may have access to these files. So you have to add this user to the ssl-cert group using the following command below:

sudo adduser xrdp ssl-cert

Step 4. Configure Firewall.

If you run a firewall on an Ubuntu server, then you should configure the firewall to allow access to the Xrdp server. Enter the following command to allow access from a certain IP range:

sudo ufw allow from 192.168.77.0/24 to any port 3389

If you’d like to allow port 3389 for any IP:

sudo ufw allow 3389

Step 5. Accessing Remote Ubuntu Desktop with RDP Client.

To connect to the remote Ubuntu machine using Xrdp we can use multiple operating systems, and we just need an RDP client installed. Windows already comes with it installed, and installing an RDP client on other operating systems is very easy.

For windows, open Remote Desktop Connection on your Windows. Then you need to enter the IP address of the Ubuntu server and click on Connect:

Install Xrdp on Ubuntu 22.04 LTS Jammy Jellyfish

Once successfully completing the above steps, you can now see the Xrdp interface. After entering the username and password, you can click on the “OK” button to log in:

Install Xrdp on Ubuntu 22.04 LTS Jammy Jellyfish

Congratulations! You have successfully installed Xrdp. Thanks for using this tutorial for installing the Xrdp remote desktop protocol (RDP) server on Ubuntu 22.04 LTS Jammy Jellyfish system. For additional help or useful information, we recommend you check the official Xrdp website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!
Back to top button