UbuntuUbuntu 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. In today’s fast-paced digital world, remote access to computer systems has become an essential requirement for many users. Whether you’re a system administrator managing multiple servers or a remote worker accessing your office desktop from home, having a reliable remote desktop solution is crucial. One such tool that has gained popularity among Linux users is Xrdp. Xrdp is an open-source remote desktop protocol (RDP) server that allows users to connect to an Ubuntu desktop environment from various platforms, including Windows, macOS, and other Linux distributions.

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. To ensure a smooth installation process and maintain the security of your Ubuntu system, it’s essential to update the package list and upgrade any existing packages to their latest versions. Open a terminal window and execute the following commands:

sudo apt update
sudo apt upgrade

Step 2. Installing Xrdp on Ubuntu 22.04.

With the system updated, we can now proceed to install the Xrdp package. Xrdp is the core component that enables remote desktop access to your Ubuntu system. To install Xrdp, run the following command in the terminal:

sudo apt install xrdp

After successful 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.

To allow remote desktop connections to your Ubuntu system, you need to configure the firewall to permit incoming traffic on the Xrdp port (default: 3389). Ubuntu 22.04 uses the Uncomplicated Firewall (ufw) by default. To open the necessary port, execute the following commands:

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

To verify that the firewall rules are correctly configured, you can use the following command:

sudo ufw status

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 complete 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 the 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!

r00t

r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button