UbuntuUbuntu Based

How To Install Xrdp on Ubuntu 24.04 LTS

Install Xrdp on Ubuntu 24.04

Remote desktop access is an essential tool for managing servers and accessing remote systems. Xrdp is an open-source implementation of the Remote Desktop Protocol (RDP) that allows users to connect to Linux systems using RDP clients. In this comprehensive guide, we’ll walk you through the step-by-step process of installing and configuring Xrdp on Ubuntu 24.04 LTS, enabling secure and efficient remote desktop connections.

What is XRDP?

Xrdp is a free and open-source remote desktop protocol (RDP) server that allows remote access to graphical user interfaces on Linux systems. It utilizes the Remote Desktop Protocol to provide a seamless remote desktop experience, similar to Microsoft Remote Desktop on Windows. Xrdp supports multiple concurrent sessions and works with various Linux desktop environments, making it a versatile solution for remote management.

Prerequisites

Before proceeding with the installation of Xrdp on Ubuntu 24.04 LTS, ensure that your system meets the following requirements:

  • A working Ubuntu 24.04 LTS server with a desktop environment installed (e.g., GNOME, KDE, Xfce)
  • Sudo or root privileges to execute administrative commands
  • A stable internet connection for downloading packages

Step 1: Updating the System

Before installing any new software, it’s crucial to update your Ubuntu system to ensure you have the latest security patches and bug fixes. Open a terminal and run the following commands:

sudo apt update
sudo apt upgrade

These commands will refresh the package list and upgrade any outdated packages to their latest versions.

Step 2: Installing XRDP

With the system updated, you can now proceed to install the Xrdp package. Execute the following command in the terminal:

sudo apt install xrdp

Press ‘Y’ when prompted to confirm the installation. Once the installation is complete, the Xrdp service will automatically start.

To verify that the Xrdp service is running, use the following command:

sudo systemctl status xrdp

If the service is active and running, you’ll see a green “active (running)” status.

Step 3: Configuring XRDP

To ensure proper operation of Xrdp, you need to add the xrdp user to the ssl-cert group. Run the following command:

sudo adduser xrdp ssl-cert

Next, restart the Xrdp service to apply the changes:

sudo systemctl restart xrdp

Xrdp uses a configuration file located at /etc/xrdp/xrdp.ini to customize session settings for different desktop environments. You can edit this file to modify settings such as port numbers, security options, and session types. However, the default configuration works well for most use cases.

Step 4: Configuring Firewall

To allow remote connections through the firewall, you need to open the RDP port (3389). If you’re using UFW (Uncomplicated Firewall), run the following command:

sudo ufw allow from <your-ip-address> to any port 3389

Replace <your-ip-address> with the IP address of the remote system you’ll be connecting from. If you want to allow connections from any IP address, you can use:

sudo ufw allow 3389

After modifying the firewall rules, reload UFW to apply the changes:

sudo ufw reload

Step 5: Connecting to Remote Desktop

With Xrdp installed and configured, you can now connect to your Ubuntu 24.04 LTS system using an RDP client. Here’s how to connect from a Windows machine:

  1. Open the Remote Desktop Connection application on your Windows client.
  2. Enter the IP address or hostname of your Ubuntu server in the “Computer” field.
  3. Click “Connect” to initiate the connection.
  4. When prompted, enter your Ubuntu username and password to authenticate.
  5. If the connection is successful, you’ll see the Ubuntu desktop environment.

Install Xrdp on Ubuntu 24.04

For a stable and responsive remote desktop experience, ensure that you have a reliable network connection between the client and the server.

 

Troubleshooting Common Issues

If you encounter any issues during the installation or connection process, here are a few troubleshooting tips:

  • Authentication Failures: Double-check that you’re using the correct username and password. Ensure that the user has the necessary permissions to log in remotely.
  • Black Screen: If you see a black screen after connecting, try restarting the Xrdp service using sudo systemctl restart xrdp.
  • Connection Refused: Verify that the Xrdp service is running and that the firewall is configured to allow RDP traffic on port 3389.
  • Session Disconnection: If your session disconnects frequently, check your network connection stability. Consider adjusting the session settings in the xrdp.ini file.

Congratulations! You have successfully installed Xrdp. Thanks for using this tutorial for installing the Xrdp remote desktop protocol (RDP) server on the Ubuntu 24.04 LTS 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 an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button