As of this writing, I’m using 64-bit Rocky Linux 8.4 that came with GNOME by default.
Since this version already has the GUI that is GNOME, this will mainly work for the settings I have. I know there are issues if you use other GUI packages.
Setup EPEL Repository
First, become the root user since the setup requires superuser privileges.
su -
Run update to make sure your install is up-to-date
yum update
Run the following command to install EPEL Repository
yum install epel-release
Install and Enable XRDP
Now you can enable EPEL Repository and install Xrdp server using the following command
dnf --enablerep=epel -y install xrdp

systemctl enable xrdp --now
Firewall Configuration
Also, let xrpd go through the firewall. Assign the correct port if you are not using the default 3389 for TCP.
firewall-cmd --add-port=3389/tcp
Make the rule permanent using the following command
firewall-cmd --runtime-to-permanent
Connect Using Windows RDP
Now you should be able to connect to Rocky Linux using Windows RDP. Make sure that the user you are using for login is not already logged in on the server or the RDP session won’t connect.

Enjoy!
