How To Install xrdp on Red Hat Enterprise Linux 8

0

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.

The steps mentioned in this article will only work if you have enabled RHEL 8 subscription or configured the local yum repository on your system.

Prerequisites

Before installing the xrdp server, you would need to install Gnome desktop using YUM command.

READ: Install Gnome Desktop on RHEL 8

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 codeready-builder-beta-for-rhel-8-x86_64-rpms repository.

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 command.

netstat -antup | grep xrdp

Output:

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

Firewall

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

Reboot your machine once before you take an xrdp session.

reboot

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.

Install xrdp on RHEL 8 - Enter IP Address in Remote Desktop Connection Window
Install xrdp on RHEL 8 – Enter IP Address in Remote Desktop Connection Window

Click Yes to accept the warning of RDP certificate name mismatch.

Install xrdp on RHEL 8 - Accept the Certificate
Install xrdp on RHEL 8 – Accept the Certificate

Log in as a regular user that you have it on the system. Make sure you use the Xvnc module.

Install xrdp on RHEL 8 - xrdp Login Page
Install xrdp on RHEL 8 – xrdp Login Page

Wait for the remote desktop session to load. You should get your desktop session in less than a half minute.

Install xrdp on RHEL 8 - RHEL 8 Desktop Screen
Install xrdp on RHEL 8 – RHEL 8 Desktop Screen

Conclusion

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.

Further Reading

You might also like

How To Install xrdp on Red Hat Enterprise Linux 8

0