Install XRDP on CentOS and RedHat Linux 8/7

xrdp is a open-source and freely available Remote Desktop Protocol application which allows to take a remote sessions of Linux Server from Windows machine. It will accept remote connection from rdesktop, freerdp and other remote desktop clients. This tutorial guides installation and configuration steps of xrdp on CentOS/RedHat Linux 8/7

1. Running instance of CentOS/RHEL System with GUI 
2. Internet to download xrdp package
3. SUDO or root access privileges
Also Read: 
. RedHat Linux 8 Installation Steps: 
. CentOS Linux 8 Installation Steps:
. How to enable or disable Red Hat Subscription-Manager on RedHat Linux

xrdp Installation Steps

Step 1: Enable EPEL (Fedora Extra Packages for Enterprise Linux) Repository
xrdp package is available on EPEL repository, so enable it to install on CentOS/RHEL Linux 8.
Click here How to Enable EPEL on RedHat Linux
Note: Extra Repository (EPEL) are not supported by RedHat


For CentOS 8/7 Linux


# dnf install epel-release
Step 2: Install Desktop Environment (If it is not installed)
Install GUI (Graphical User Interface) with following command if is not installed.
$ sudo dnf group list
$ sudo dnf groupinstall “Server with GUI”
Step 3: Install xrdp on CentOS/RHEL Linux 8
Following command to install xrdp applications (Click on picture to enlarge it).
# dnf install tigervnc-server xrdp
Step 4: Start/Enable and check the Status of xrdp.service 
Once xrdp installation is done, start xrdp server with systemctl command (Click on picture to enlarge it).
$ sudo systemctl start xrdp.service
$ sudo systemctl status xrdp.service
$ sudo systemctl enable xrdp.service
Step 5: Check xrdp connection listening on port 3389 by default
xrdp is now listening on port 3389, check with following ss or netstat command below (Click on picture to enlarge it).
# netstat -antp | grep xrdp
Step 6: How to change default port to other custom port.
To change the default port of xrdp, edit xrdp.ini file at Global section, add entry port=4489 and restart xrdp.service (Click on picture to enlarge it).


# vi /etc/xrdp/xrdp.ini
Check xrdp listening on port 4489 (Click on picture to enlarge it).


Step 7: Check the status of firewall service.
$ sudo systemctl status firewalld.service
Add following rule on Firewall (if the Firewall service is enabled).
$ sudo firewall-cmd –permanent –add-port=3389/tcp
$ sudo firewall-cmd –reload
Step 8: Access RedHat/CentOS Linux 8 system using xrdp
Now, it’s time to take RDP session from any Windows machine using Remote Desktop Protocol.
Below screen shows that we have successfully taken GUI session from Windows machine.
Conclusion: In this guide, we have install xrdp and seen demo how to take a Linux GUI session remotely from Windows machine. Please share it with Your Friends & Help Someone… and also like our tecluesdotcom facebook official page. Let me hear your thoughts in the comments below!!!


Leave a Comment