Install Xrdp on Rocky Linux 9

This article will take you through how to install Xrdp on Rocky Linux 9. Xrdp provides a graphical login to remote machines using RDP (Microsoft Remote Desktop Protocol). It is a free and open-source Remote Desktop Protocol(RDP) server that allows non-Windows operating systems such as Linux and BSD-style operating systems to deliver a fully functional RDP-compatible remote desktop experience.

How to Install Xrdp on Rocky Linux 9

  • Add EPEL repository to your system
sudo dnf install epel-release
  • Update your system.
sudo dnf update
  • Then install Xrdp using the command below.
sudo dnf install xrdp

Sample output

Dependencies resolved.
=====================================================================
 Package           Arch        Version               Repo       Size
=====================================================================
Installing:
 xrdp              x86_64      1:0.9.19-1.el9        epel      457 k
Installing dependencies:
 imlib2            x86_64      1.7.4-1.el9           epel      225 k
Installing weak dependencies:
 xrdp-selinux      x86_64      1:0.9.19-1.el9        epel       13 k

Transaction Summary
=====================================================================
Install  3 Packages

Total download size: 695 k
Installed size: 3.0 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): xrdp-selinux-0.9.19-1.el9.x86 4.6 kB/s |  13 kB     00:02    
(2/3): imlib2-1.7.4-1.el9.x86_64.rpm  65 kB/s | 225 kB     00:03    
(3/3): xrdp-0.9.19-1.el9.x86_64.rpm   44 kB/s | 457 kB     00:10    
---------------------------------------------------------------------
Total                                 59 kB/s | 695 kB     00:11     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                             1/1 
  Installing       : imlib2-1.7.4-1.el9.x86_64                   1/3 
  Installing       : xrdp-selinux-1:0.9.19-1.el9.x86_64          2/3 
  Running scriptlet: xrdp-selinux-1:0.9.19-1.el9.x86_64          2/3 
  Installing       : xrdp-1:0.9.19-1.el9.x86_64                  3/3 
  Running scriptlet: xrdp-1:0.9.19-1.el9.x86_64                  3/3 
  Verifying        : imlib2-1.7.4-1.el9.x86_64                   1/3 
  Verifying        : xrdp-1:0.9.19-1.el9.x86_64                  2/3 
  Verifying        : xrdp-selinux-1:0.9.19-1.el9.x86_64          3/3 

Installed:
  imlib2-1.7.4-1.el9.x86_64             xrdp-1:0.9.19-1.el9.x86_64   
  xrdp-selinux-1:0.9.19-1.el9.x86_64   

Complete!
  • Next, enable Xrdp to start on boot.
sudo systemctl enable --now xrdp
  • Check Xrdp status using the following command.
sudo systemctl status xrdp

Sample output

● xrdp.service - xrdp daemon
     Loaded: loaded (/usr/lib/systemd/system/xrdp.service; enabled; vendor preset: disabled)
     Active: active (running) since Tue 2022-07-26 23:53:25 EAT; 1min 3s ago
       Docs: man:xrdp(8)
             man:xrdp.ini(5)
   Main PID: 4851 (xrdp)
      Tasks: 1 (limit: 23284)
     Memory: 1.0M
        CPU: 10ms
     CGroup: /system.slice/xrdp.service
             └─4851 /usr/sbin/xrdp --nodaemon

Jul 26 23:53:25 localhost.localdomain systemd[1]: Started xrdp daemon.
Jul 26 23:53:26 localhost.localdomain xrdp[4851]: [INFO ] starting xrdp with pid 4851
Jul 26 23:53:26 localhost.localdomain xrdp[4851]: [INFO ] address [0.0.0.0] port [3389] mode 1
Jul 26 23:53:26 localhost.localdomain xrdp[4851]: [INFO ] listening to port 3389 on 0.0.0.0
Jul 26 23:53:26 localhost.localdomain xrdp[4851]: [INFO ] xrdp_listen_pp done
  • Allow Xrdp server on your firewall.
sudo firewall-cmd --permanent --add-port=3389/tcp
  • Then reload the firewall to apply changes.
sudo firewall-cmd --reload

Test Xrdp Connection

  • Check your Rocky Linux IP address.
ip a
  • Then open RDP and enter your Rocky Linux IP as shown below.
Install Xrdp on Rocky Linux 9
Install Xrdp on Rocky Linux 9
  • Click Yes to connect.
Install Xrdp on Rocky Linux 9
Install Xrdp on Rocky Linux 9
  • Enter your Rocky Linux 9 login details. Ensure the user is not logged in while connecting via RDP. Log out to avoid a black screen.
Install Xrdp on Rocky Linux 9
Install Xrdp on Rocky Linux 9
  • You will be able to access Rocky Linux 9 after successful authentication.
Install Xrdp on Rocky Linux 9
Install Xrdp on Rocky Linux 9
  • That marks the end of our article, we have gone through how to install Xrdp on Rocky Linux 9.

Read more about Xrdp

Other Tutorials

Install Xrdp Server on Ubuntu 22.04

Install Xrdp on Fedora 36

Install Xrdp on OpenSUSE

System administrator | Software Developer | DevOps

Leave a Comment