How To Install XRDP on Rocky Linux 9

This tutorial will teach you How To Install and Configure XRDP on Rocky Linux 9.

XRDP is a free and open-source implementation of Microsoft RDP (Remote Desktop Protocol) server for operating systems other than Windows, such as Linux. It offers some key advantages:

  • It’s open-source
  • It makes it simpler to connect to Linux systems
  • It’s fairly quick to set up
  • It’s not bandwidth intensive
  • It’s entirely free

Steps To Install and Configure XRDP on Rocky Linux 9

To complete this guide, you must log in to your server as a non-root user with sudo privileges and set up a basic firewall. To do this, you can follow our guide on Initial Server Setup with Rocky Linux 9.

Install Gnome GUI on Rocky Linux 9

First, you need to update your local package index with the following command:

sudo dnf update -y

Gnome is the default desktop environment on Rocky Linux 9. To install it, use the following command:

sudo dnf groupinstall "Server with GUI" -y

Your installation may take some time to complete.

Install XRDP on Rocky Linux 9

Xrdp is available in the Epel repository. You need to install the Epel repo on your server with the following command:

sudo dnf install epel-release -y

Now you can install Xrdp on Rocky Linux 9 with the following command:

sudo dnf install xrdp -y

Start and Enable XRDP

When your installation is finished, you need to start and enable the service with the following command:

sudo systemctl enable xrdp --now

Verify that Xrdp is active and running on Rocky Linux 9 with the following command:

sudo systemctl status xrdp

In your output you will see:

● xrdp.service - xrdp daemon
     Loaded: loaded (/usr/lib/systemd/system/xrdp.service; enabled; vendor pres>
     Active: active (running) since Mon 2022-11-26 05:09:16 EDT; 6s ago
       Docs: man:xrdp(8)
   Main PID: 13167 (xrdp)
      Tasks: 1 (limit: 23609)
     Memory: 1.1M
        CPU: 7ms
     CGroup: /system.slice/xrdp.service
             └─13167 /usr/sbin/xrdp --nodaemon

Now that you have Xrdp active and running on your server, let’s configure Xrdp on Rocky Linux 9.

Configure XRDP on Rocky Linux 9

For basic Xrdp connections, you do not need to make any changes to the configuration files. Xrdp uses the default X Window desktop, which in this case, is Gnome.

The configuration files are located in the /etc/xrdp directory. And the main configuration file is the xrdp.ini. It allows you to set global configuration settings like security and listening addresses and create different xrdp login sessions.

Just remember every time you make any changes you need to restart the Xrdp to apply the changes:

sudo systemctl restart xrdp

Also, Xrdp uses the file to launch the X session. If you want to use another X Window desktop, edit this file.

Configure Firewall For XRDP

Here you need to add a rule to allow traffic on the Xrdp port. By default, Xrdp listens on port 3389.

Typically you would want to allow access to the Xrdp server only from a specific IP address or IP range. To do this, run the following commands:

sudo firewall-cmd --new-zone=xrdp --permanent
sudo firewall-cmd --zone=xrdp --add-port=3389/tcp --permanent
sudo firewall-cmd --zone=xrdp --add-source= --permanent

To allow traffic to port 3389 from anywhere you can use the following command instead:

sudo firewall-cmd --add-port=3389/tcp --permanent

After this, you need to reload the firewall to apply these changes:

sudo firewall-cmd --reload

To boot into Graphical mode, we will reboot the system with the below command,


Now that the Xrdp server is configured, it is time to open your local Xrdp client and connect to the remote Rocky Linux 9 system.

XRDP Connection

To access the remote Rocky Linux 9, open the run window with Winky+R and type the “mstsc” in it. This will open the RDP client. Type your IP address and click connect:

XRDP Remote connection

This will display a warning that the identity of the remote computer cannot be verified. Click the don’t ask me again and press yes to continue:

XRDP connection

Now on the login screen enter your server’s username and password:

XRDP login screen

Once logged in, you should see the default Rocky Linux 9 Gnome desktop. It should look something like this:

XRDP Rocky Linux 9

You can now start interacting with the remote desktop from your local machine using your keyboard and mouse.

Note: If you are using macOS, you can install the Microsoft Remote Desktop application from the Mac App Store. Linux users can use an RDP client such as Remmina or Vinagre.


At this point, you have learned to Install and Configure XRDP on Rocky Linux 9.

Hope you enjoy it.

You may be like these articles:

Install and Configure XRDP on Ubuntu 22.04

Install and Configure XRDP on Debian 11

How To Install XRDP on Centos 7

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!