How to Configure xRDP Remote Desktop Server In Rhel/Centos 7

In this article we are going to learn how to configure xRDP Remote Desktop Server in Linux Systems, Before that let me explain to you what is XRDP. XRDP Remote Desktop Server is nothing but a service or a daemon which allows user to take remote of Linux Operating System from RDP (Remote Desktop Protocol) clients. As we all know that RDP stands for Remote Desktop Protocol comes with Microsoft Windows Operating Systems. With the help of XRDP, we can able to take remote of Linux Operating Systems graphically from Windows Systems. XRDP is used x11rdp at the backend to manage X Sessions. XRDP is an open-source application that was invented in the year 2005 which is a nice replacement for a desktop. There is also a nice alternative to XRDP is VNC but XRDP Remote Desktop Server is more reliable when we are talking about taking remote from MS Windows Systems. XRDP uses RSA Public Key and Private key encryption to transfer data over the network so there is no risk of security as far as you are using this on a Local Network but I would suggest you not to use it over the Internet. The main configuration file of XRDP is /etc/xrdp/xrdp.ini. For more Information and Documentation on XRDP go to Click Here!

How to Configure xRDP Remote Desktop Server In Rhel/Centos 7

How to Configure xRDP Remote Desktop Server In Rhel/Centos 7

So here I explained to you a simple configuration step to Configure XRDP Remote Desktop Server in RHEL/CentOS/Fedora.

Follow the Below Steps to Configure xRDP Remote Desktop Server :

Step: 1 Install Required Packages

Before we start the configuration of the XRDP Remote Desktop Server we need to install all required packages and dependencies of XRDP.

Packages Required :

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

So Let’s go ahead and install our first package i.e. epel-release by using below command.

[root@localhost ~]# 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 remaining packages i.e. xrdp, tigervnc-server by using the below command.

[root@localhost ~]# 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) <epel@fedoraproject.org>
 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!

Also Read – How To Configure Telnet Server And Telnet Client In Rhel/Centos/Fedora

Step: 2 Configure Main configuration File of xRDP Remote Desktop Server (xrdp.ini)

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

Here I am using the default configuration of the xrdp.ini file but you can modify or configure it differently as per your scenario or need.

[root@localhost ~]# 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 xrdp Service

Start the xrdp service.

[root@localhost ~]# /etc/init.d/xrdp start   # Start xrdp Service
Starting xrdp:                                             [  OK  ]
Starting xrdp-sesman:                                      [  OK  ]

Now start the xrdp service at startup.

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

Step: 4 Stop Iptables Service

Stop the Linux Firewall Service i.e  iptables.

[root@localhost ~]# /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 Client-Side

We have done with our configuration part from Server Side, Let’s check from the client-side to confirm if XRDP Remote Desktop Server is working properly or not.

For that just go and log in to any Microsoft Windows Operating System (eg : Windows XP, Windows 7, Windows 10) and open the Remote Desktop Connection Client by following below steps: START -> All Program -> Accessories -> Remote Desktop Connection OR Just go to Start->Run and type mstsc. then you will able to see a window like as shown on the snapshot below.

Then enter the IP Address of XRDP Remote Desktop Server on Computer Text Box and click on connect as shown on the snapshot below.

How to Configure Xrdp Remote Desktop Server In Rhel/Centos 7

XRDP Client (Remote Desktop Client)

Connecting to XRDP Server.

How to Configure Xrdp Remote Desktop Server In Rhel/Centos 7

Connecting to XRDP Server

Then click on Yes.

How to Configure Xrdp Remote Desktop Server In Rhel/Centos 7

Click Yes to connect XRDP Server

As we can see below we have connected to XRDP Server and now it’s asking for Username & Password, Here just enter the local Username and Password of the Linux System.

For eg: I have a Username i.e. itsmarttricks

[root@localhost ~]# cat /etc/passwd | grep -i itsmarttricks
itsmarttricks:x:500:500:itsmarttricks:/home/itsmarttricks:/bin/bash

Follow the Snapshot below for your Reference.

Enter Username and Password to Authentication with XRDP Server

Enter Username and Password to Authentication with XRDP Server

We have successfully connected to XRDP Remote Desktop Server and able to take Remote of our Linux System. Refer the snapshot below.

How to Configure Xrdp Remote Desktop Server In Rhel/Centos 7

Remote Console of Linux System XRDP Server

That’s all, In this article, we have explained the how-to Configure xRDP Remote Desktop Server In Rhel/Centos 7 ( Centos RDP and RedHat Remote Desktop). I hope you enjoy this article. If you like this article, then just share it. If you have any questions about this article, please comment.

Share this:

Mangesh Dhulap

This is Mangesh Dhulap the Founder and Editor of IT SMART TRICKS have 6+ years of Industrial Experience. We expect from our visitors to like, share, and comment on our posts.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.