How To Install xrdp on Red Hat Enterprise Linux 8
xrdp is a free and open-source Remote desktop Protocol server which allows you to take remote desktop sessions of Linux server from Windows machine / Linux Machine. It is capable of accepting remote connections from rdesktop, freerdp, and remote desktop clients.
This post will help you to install xrdp on RHEL 8.
Before installing the xrdp server, you would need to install Gnome desktop using YUM command.
Install xrdp on RHEL 8
At the time writing the article, xrdp is not available as RPM package for Red Hat Enterprise Linux 8. So, we would need to compile and install xrdp from source.
To compile the xrdp, we need to install development packages and libraries.
yum install -y git openssl-devel pam-devel libX11-devel libXfixes-devel libXrandr-devel gcc clang make automake libtool pkgconfig
The nasm package is not available in the base repository which is mandatory for compiling. So, we will install nasm package by temporarily enabling the
yum install -y nasm --enablerepo=codeready-builder-beta-for-rhel-8-x86_64-rpms
Here, will use Xvnc server with xrdp. So, install the TigerVNC and Xorg packages.
yum install -y tigervnc-server xorg* coreutils wget
Download the latest version of xrdp from GitHub.
git clone --recursive https://github.com/neutrinolabs/xrdp
Compile the xrdp using below commands.
cd xrdp ./bootstrap ./configure make make install
Once xrdp is installed, start the xrdp server service using the systemctl command.
systemctl start xrdp
xrdp should now be listening on 3389. You can confirm this by using
netstat -antup | grep xrdp
tcp 0 0 0.0.0.0:3389 0.0.0.0:* LISTEN 1508/xrdp tcp 0 0 127.0.0.1:3350 0.0.0.0:* LISTEN 1507/xrdp-sesman
By default, xrdp server service won’t start automatically after a system reboot. Execute the below command to enable the service at system startup.
systemctl enable xrdp
Configure the firewall to allow RDP connections from external machines. The below command will add the exception for RDP port (3389).
firewall-cmd --permanent --add-port=3389/tcp firewall-cmd --reload
Reboot your machine once before you take an xrdp session.
Access RHEL 8 via xrdp
Now, take an RDP session from any windows machine using Remote Desktop Connection program.
Type the IP address of your Linux server in the computer field and then click the Connect.
Click Yes to accept the warning of RDP certificate name mismatch.
Log in as a regular user that you have it on the system. Make sure you use the
Wait for the remote desktop session to load. You should get your desktop session in less than a half minute.
You have successfully installed xrdp on Red Hat Enterprise Linux 8. xrdp is now accepting TLS security layer connections by which you can secure xrdp connections to the server. Additionally, you can install PulseAudio to do Audio Output Redirection.