How to configure the xRDP remote desktop server in Rhel / Centos 7

This article explains how to configure the xRDP remote desktop server in Linux systems. Before that, I want to explain what XRDP is. XRDP Remote Desktop Server is nothing more than a service or daemon that allows users to remotely control the Linux operating system from Remote Desktop Protocol (RDP) clients. As we all know, RDP for Remote Desktop Protocol comes with Microsoft Windows operating systems. With the help of XRDP we can graphically remove Linux operating systems from Windows systems. XRDP is used x11rdp in the backend to manage X sessions. XRDP is an open source application that was invented in 2005 and is a good replacement for rdesktop. There is also a good alternative to XRDP: VNC, but XRDP Remote Desktop Server is more reliable when it comes to using MS Windows systems remotely. XRDP uses public and private RSA key encryption to transfer data over the network. Therefore, there is no security risk if you use this in the local network. However, I would recommend not using it over the internet. The main configuration file of XRDP is /etc/xrdp/xrdp.ini, Further information and documentation on XRDP can be found at Click here!

Centos 7″ src=”data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7″ data-src=”https://www.itsmarttricks.com/wp-content/uploads/2020/02/Configure-Xrdp-Remote-Desktop-Server-In-Rhel-Centos-7.png” alt=”How to configure the xRDP remote desktop server in Rhel / Centos 7″ width=”782″ height=”440″ data-srcset=”https://www.itsmarttricks.com/wp-content/uploads/2020/02/Configure-Xrdp-Remote-Desktop-Server-In-Rhel-Centos-7.png 782w, https://www.itsmarttricks.com/wp-content/uploads/2020/02/Configure-Xrdp-Remote-Desktop-Server-In-Rhel-Centos-7-768×432.png 768w” data-sizes=”(max-width: 782px) 100vw, 782px”>

How to configure the xRDP remote desktop server in Rhel / Centos 7

Here I have explained some simple configuration steps for configuring the XRDP remote desktop server in RHEL / CentOS / Fedora.

Complete the following steps to configure the xRDP remote desktop server:

Step: 1 Install the required packages

Before we start configuring XRDP Remote Desktop Server, we need to install all the necessary packages and dependencies on XRDP.

Required packages:

  • EPEL release.xxx.xx.xxx.rpm
  • xrdp.xxx.xx.xxx.rpm
  • tigervnc-server.xxx.xx.xxx.rpm

So let’s install our first package, d. H. Epel release by using the following command.

[[email protected] ~]# yum -y install epel-release   # Install epel-release Package
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * extras: mirror.tadu.vn
 * updates: centos.mirror.net.in
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:6-8 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                Arch             Version         Repository        Size
================================================================================
Installing:
 epel-release           noarch           6-8             extras            14 k

Transaction Summary
================================================================================
Install       1 Package(s)

Total download size: 14 k
Installed size: 22 k
Downloading Packages:
epel-release-6-8.noarch.rpm                              |  14 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : epel-release-6-8.noarch                                      1/1 
  Verifying  : epel-release-6-8.noarch                                      1/1 

Installed:
  epel-release.noarch 0:6-8                                                     

Complete!

Now install the remaining packages, i. H. Xrdp, tigervnc-server by using the following command.

[[email protected] ~]# yum -y install xrdp tigervnc-server   # Install xrdp Package
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: centos.mirror.net.in
 * epel: ftp.jaist.ac.jp
 * extras: mirror.tadu.vn
 * updates: centos.mirror.net.in
Resolving Dependencies
--> Running transaction check
---> Package tigervnc-server.x86_64 0:1.1.0-18.el6 will be installed
--> Processing Dependency: xorg-x11-fonts-misc for package: tigervnc-server-1.1.0-18.el6.x86_64
---> Package xrdp.x86_64 0:0.6.1-4.el6 will be installed
--> Running transaction check
---> Package xorg-x11-fonts-misc.noarch 0:7.2-11.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                    Arch          Version             Repository   Size
================================================================================
Installing:
 tigervnc-server            x86_64        1.1.0-18.el6        base        1.0 M
 xrdp                       x86_64        0.6.1-4.el6         epel        244 k
Installing for dependencies:
 xorg-x11-fonts-misc        noarch        7.2-11.el6          base        5.8 M

Transaction Summary
================================================================================
Install       3 Package(s)

Total download size: 7.1 M
Installed size: 11 M
Downloading Packages:
(1/3): tigervnc-server-1.1.0-18.el6.x86_64.rpm           | 1.0 MB     00:01     
(2/3): xorg-x11-fonts-misc-7.2-11.el6.noarch.rpm         | 5.8 MB     00:10     
(3/3): xrdp-0.6.1-4.el6.x86_64.rpm                       | 244 kB     00:01     
--------------------------------------------------------------------------------
Total                                           514 kB/s | 7.1 MB     00:14     
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
 Userid : EPEL (6) 
 Package: epel-release-6-8.noarch (@extras)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : xorg-x11-fonts-misc-7.2-11.el6.noarch                        1/3 
  Installing : tigervnc-server-1.1.0-18.el6.x86_64                          2/3 
  Installing : xrdp-0.6.1-4.el6.x86_64                                      3/3 
  Verifying  : xrdp-0.6.1-4.el6.x86_64                                      1/3 
  Verifying  : tigervnc-server-1.1.0-18.el6.x86_64                          2/3 
  Verifying  : xorg-x11-fonts-misc-7.2-11.el6.noarch                        3/3 

Installed:
  tigervnc-server.x86_64 0:1.1.0-18.el6        xrdp.x86_64 0:0.6.1-4.el6       

Dependency Installed:
  xorg-x11-fonts-misc.noarch 0:7.2-11.el6                                       

Complete!

Read also – Configure Telnet server and Telnet client in Rhel / Centos / Fedora

Step: 2 Configure the main configuration file of the xRDP remote desktop server (xrdp.ini).

We have installed all the necessary packages. Now let’s look at the configuration part. The main configuration file of xrdp Remote Desktop Server is xrdp.ini which is at /etc/xrdp/xrdp.ini,

Here I use the default configuration of the xrdp.ini file, but you can change or configure it differently depending on the scenario or need.

[[email protected] ~]# nano /etc/xrdp/xrdp.ini 

#grey=d6d3ce
#dark_grey=808080
#blue=08246b
#dark_blue=08246b
#white=ffffff
#red=ff0000
#green=00ff00
#background=626c72

[xrdp1]
name=Local User Authentication   # This name will show during Authentication
lib=libvnc.so
username=ask   # "ask" means XRDP will ask for Username during Authentication
password=ask   # XRDP will ask for Password during Authentication
ip=127.0.0.1   
port=-1     # "-1" Looks for Free Port to Connect

Step: 3 Start the xrdp service

Start the xrdp service.

[[email protected] ~]# /etc/init.d/xrdp start   # Start xrdp Service
Starting xrdp:                                             [  OK  ]
Starting xrdp-sesman:                                      [  OK  ]

Now start the xrdp service at startup.

[[email protected] ~]# chkconfig --level 35 xrdp on   # Start xrdp Service on startup
[[email protected] ~]# chkconfig --list xrdp
xrdp            0:off   1:off   2:off   3:on    4:off   5:on    6:off

Step: 4 Stop the Iptables service

Stop the Linux firewall service, i. H. Iptables.

[[email protected] ~]# /etc/init.d/iptables stop   # Stop the Firewall
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]

Step: 5 Testing from the client side

We carried out our configuration part from the server side. Let’s check from the client side whether XRDP Remote Desktop Server is working properly or not.

Simply log on to a Microsoft Windows operating system (e.g. Windows XP, Windows 7, Windows 10) and open the remote desktop connection client with the following steps: START -> All Programs -> Accessories -> Remote Desktop Connection OR Go only Go to Start-> Run and type mstsc, Then you can see a window like in the snapshot below.

Then enter the IP address of the XRDP remote desktop server in the Computer text box and click Connect as shown in the snapshot below.

How to configure the Xrdp remote desktop server in Rhel / Centos 7

XRDP client (remote desktop client)

Connect to the XRDP server.

How to configure the Xrdp remote desktop server in Rhel / Centos 7

Connect to the XRDP server

Then click Yes.

How to configure the Xrdp remote desktop server in Rhel / Centos 7

Click Yes to connect to the XRDP server

As we can see below, we have connected to the XRDP server and are now asking for username and password. Simply enter the local user name and password of the Linux system here.

For example: I have a username, i.e. itsmarttricks

[[email protected] ~]# cat /etc/passwd | grep -i itsmarttricks
itsmarttricks:x:500:500:itsmarttricks:/home/itsmarttricks:/bin/bash

Follow the snapshot below for reference.

Enter username and password for authentication with XRDP Server

Enter username and password for authentication with XRDP Server

We have successfully connected to the XRDP Remote Desktop Server and can take over remotely from our Linux system. See the snapshot below.

How to configure the Xrdp remote desktop server in Rhel / Centos 7

Linux System XRDP Server remote console

That’s all. In this article we explained how to configure the xRDP remote desktop server in Rhel / Centos 7 (Centos RDP and RedHat remote desktop). I hope you like this article. If you like this article, just share it. If you have any questions about this article, please comment.

Sidebar