25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

Need help?

Our experts have had an average response time of 11.43 minutes in March 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

How to install XRDP on CentOS 7 or RHEL 7

by | Sep 20, 2021

Trying to install XRDP on CentOS 7 or RHEL 7? Well, you have come to the right place! Our Support Engineers are here to help you out.

Our Server Management Services is here to help with all your queries, big and small. Recently, we helped one of our clients install XRDP on their CentOS 7. Let’s dive in and see how the Support Team went about with the installation.

Prerequisites: Install XRDP on CentOS 7/RHEL 7

XRDP is an open-source version of the Microsoft Remote desktop Protocol server. It enables operating systems besides Microsoft Windows to offer a fully functional remote desktop experience.
The prerequisites for the installation include:

  1. Before all else, install Gnome GUI on CentOS 7 or RHEL 7.
  2. Then install and configure EPEL repository with this command
    rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Part 1: Install XRDP on CentOS 7/RHEL 7

Install XRDP package on CentOS7 or RHEL 7 with the following YUM command :

yum, -y install xrdp tigervncserver

As a result, you will get output similar to this:

Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.excellmedia.net
 * epel: del-mirrors.extreme-ix.org
 * extras: centos.excellmedia.net
 * updates: centos.excellmedia.net
Resolving Dependencies
--> Running transaction check
---> Package tigervnc-server.x86_64 0:1.8.0-2.el7_4 will be installed
---> Package xrdp.x86_64 1:0.9.5-1.el7 will be installed
--> Processing Dependency: xorgxrdp for package: 1:xrdp-0.9.5-1.el7.x86_64
--> Running transaction check
---> Package xorgxrdp.x86_64 0:0.2.5-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================
 Package                    Arch              Version                   Repository          Size
=================================================================================================
Installing:
 tigervnc-server            x86_64            1.8.0-2.el7_4             updates            213 k
 xrdp                       x86_64            1:0.9.5-1.el7             epel               413 k
Installing for dependencies:
 xorgxrdp                   x86_64            0.2.5-3.el7               epel                61 k

Transaction Summary
=================================================================================================
Install  2 Packages (+1 Dependent package)

Total download size: 688 k
Installed size: 2.7 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/epel/packages/xrdp-0.9.5-1.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for xrdp-0.9.5-1.el7.x86_64.rpm is not installed
(1/3): xrdp-0.9.5-1.el7.x86_64.rpm                                        | 413 kB  00:00:01
(2/3): tigervnc-server-1.8.0-2.el7_4.x86_64.rpm                           | 213 kB  00:00:01
(3/3): xorgxrdp-0.2.5-3.el7.x86_64.rpm                                    |  61 kB  00:00:01
-------------------------------------------------------------------------------------------------
Total                                                            409 kB/s | 688 kB  00:00:01
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
 Userid     : "Fedora EPEL (7) "
 Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
 Package    : epel-release-7-11.noarch (installed)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : xorgxrdp-0.2.5-3.el7.x86_64                                                   1/3
  Installing : 1:xrdp-0.9.5-1.el7.x86_64                                                     2/3
  Installing : tigervnc-server-1.8.0-2.el7_4.x86_64                                          3/3
  Verifying  : xorgxrdp-0.2.5-3.el7.x86_64                                                   1/3
  Verifying  : tigervnc-server-1.8.0-2.el7_4.x86_64                                          2/3
  Verifying  : 1:xrdp-0.9.5-1.el7.x86_64                                                     3/3

Installed:
  tigervnc-server.x86_64 0:1.8.0-2.el7_4                xrdp.x86_64 1:0.9.5-1.el7

Dependency Installed:
  xorgxrdp.x86_64 0:0.2.5-3.el7

Complete!

Part 2: Install XRDP on CentOS 7

After XRDP is installed, you can start the service with the command:

systemctl start xrdp

XRDP will now listen on 3389. You can verify this with the following netstat command:

netstat -antup | grep xrdp

This results in the following 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

We would like to point out that the XRDP will not start automatically after a reboot. Hence, run this command to enable the service during system startup:

systemctl enable xrdp

Configure the firewall

The next step is to configure the firewall in order to permit RDP connections from external machines. Run this command to add the exception for the RDP port:

firewall-cmd –permanent –add-port=3389/tcp
firewall-cmd –reload

Configure SELinux

Run the following commands to configure SELinux:

chcon –type=bin_t /usr/sbin/xrdp
chcon –type=bin_t /usr/sbin/xrdp-sesman

Test XRDP Remote Connectivity

Next, let’s check the remote connectivity. First, take RDP on any Windows machine via Remote Desktop Connection. Then enter the Linux server’s IP address in the computer field and click connect.

Install XRDP on CentOS 7 or RHEL 7: Remote Desktop Connection

Ignore the RDP certificate name mismatch warning.

Install XRDP on CentOS 7 or RHEL 7: Accept Certificate

Then enter the username and password. You can opt for the root or any user available on the system. Ensure you use the module Xvnc.

Install XRDP on CentOS 7 or RHEL 7: XRDP log in page

Once you click ok, you will obtain the desktop within thirty seconds.

Install XRDP on CentOS 7 or RHEL 7: XRDP CentOS Desktop

[Need assistance with Server Management? We are just a click away.]

Conclusion

In conclusion, we learned how to install XRDP on CentOS 7/RHEL 7 under the guidance of the Support Team at Bobcares.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

4 Comments

  1. Artem

    On Centos 7 I am getting tcp6 with netstat and I can’t connect:

    #netstat -antup | grep xrdp
    #tcp6 0 0 :::3389 :::* LISTEN 1622/xrdp
    #tcp6 0 0 ::1:3350 :::* LISTEN 1621/xrdp-sesman

    Is there a way to make it IPv4?

    Reply
    • Hiba Razak

      Hi,
      Please contact our support team via live chat

      Reply
  2. jonfon

    I have the same issue but I was able to change the xrdp but not the #tcp6 0 0 ::1:3350 :::* LISTEN 1621/xrdp-sesman. I do not know where I can change it so it does not listen to the tcp6 port.

    Reply
    • Hiba Razak

      Hi jonfon,
      Please contact our support team via live chat(click on the icon at right-bottom).

      Reply

Submit a Comment

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

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF