Phone :  +370 (5) 204-1903
Email: sales@1gbits.com

How to install xrdp on CentOS 7

xRDP is an open-source remote desktop protocol application that allows remote sessions of Linux Server through Windows remote desktop connection. It is capable of accepting remote connections from rdesktop, freerdp and other remote desktop clients.

Centos Tutorials Jan 23, 18 by Mery 4 min Read
How to install xrdp on CentOS 7

In this article, we will show you how to install the xrdp server on CentOS 7. Note that the following tutorial is suitable for CentOS 8 machines as well. Before we get started:


  • A root user account or a user account with root privileges
  • A CentOS 7 machine or server (can be switched with CentOS 8)
  • Basic understanding of Linux commands

Step 1: Update the system.

We will install xRDP on your CentOS 7 server. But before we get to the installation, it's better to update all your existing packages installed on the system:

yum -y update

Step 2: Install EPEL repository.

Once the system is updated, we will need to install the EPEL repository as the xrdp package is readily available through this repository:

yum install epel-release

Don't forget to press y when prompted to continue.

Step 3: Install xrdp on CentOS 7

Now we're all set to install xRDP on your system. Enter the following command:

yum install tigervnc-server xrdp

You will see an output similar to the one below once the installation is completed.


Step 4: Start and Enable xrdp.

Once the desktop environment and the xrdp service is installed on your system, it's time to start the server using systemctl commands. The enable command makes it possible for xrdp to run during system startup.

systemctl start xrdp.service

systemctl enable xrdp.service

systemctl status xrdp.service

You should see an output similar to this one.


Step 5: check xrdp connection

Now xrdp service should be listening on port 3389 by default. To confirm this, enter the following command:

netstat -antup | grep xrdp


Step 6: Install a desktop environment.

You will need to have a desktop environment on your server if it is not already installed. We recommend installing GNOME GUI for CentOS 7.

Check the link above for a more in-depth installation guide. Here is the summary of installing GNOME GUI on CentOS 7.

  • Install GNOME GUI

yum groupinstall "GNOME Desktop" –y

  • Start the GUI on default

systemctl set-default graphical.target

  • Reboot the system


Step 7: Firewall configurations

You can check the status of your firewall using the following command:

systemctl status firewalld.service

If it is not active, remember to activate and enable the firewall on your system.

systemctl enable firewalld.service

systemctl start firewalld.service

By default, the firewall blocks remote RDP connections from external machines. We will add the following code to add an exception in the firewall to accept traffic from the RDP port 3389.

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

Restart the firewall to activate the settings.

firewall-cmd --reload

Reloading the firewall should work, but in some cases, the configurations will not come into effect. To avoid any error messages, we recommend restarting your system.


Step 8: Connect to the Linux server through a remote desktop connection.

The moment of truth is finally here. Log in to your Windows machine and open up Remote Desktop Connection.

  • Click on start and type "remote desktop connection."
  • Select the application
  • Enter the Linux server IP address
  • Click Connect


During the connection, you will be prompted with a warning. Disregard this message and continue.


Now select the Xvnc session and enter the username and password. You can use the root user account or any other user accounts on the system.


Once connected, you will be connected to your CentOS 7 server through the remote desktop connection.

Final words

In this short tutorial, we went through the process of installing xRDP on the CentOS 7 server so that we can connect remotely to it through a Windows remote desktop connection. With just eight steps, we managed to get it up and running.

We hope you could connect to your CentOS (Linux) server through the Windows RDP client. Your feedback is important to us, so don't forget to add a comment in the section below.

author img


Generic placeholder image
Ali Imtiaz

2018 May 31, 15:05:53

Error: Package: xorgxrdp-0.2.6-2.el7.x86_64 (epel) Requires: xorg-x11-server-Xorg(x86-64) = 1.19.5 Installed: xorg-x11-server-Xorg-1.19.3-11.el7.x86_64 (@InstallMedia) xorg-x11-server-Xorg(x86-64) = 1.19.3-11.el7 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest Please help I'm new to linux

Generic placeholder image

2019 Jan 01, 15:01:26

This page really has all of the information I needed concerning this subject and didn't know who to ask.

Generic placeholder image

2019 Sep 04, 19:09:51

An Error when executing : yum -y install xrdp tigervnc-server Error: Package: xorgxrdp-0.2.11-1.el7.x86_64 (epel) Requires: xorg-x11-server-Xorg(x86-64) = 1.20.4 Available: xorg-x11-server-Xorg-1.20.1-3.el7.x86_64 (base) xorg-x11-server-Xorg(x86-64) = 1.20.1-3.el7 Available: xorg-x11-server-Xorg-1.20.1-5.el7.x86_64 (updates) xorg-x11-server-Xorg(x86-64) = 1.20.1-5.el7 Available: xorg-x11-server-Xorg-1.20.1-5.1.el7.x86_64 (updates) xorg-x11-server-Xorg(x86-64) = 1.20.1-5.1.el7 Available: xorg-x11-server-Xorg-1.20.1-5.2.el7_6.x86_64 (updates) xorg-x11-server-Xorg(x86-64) = 1.20.1-5.2.el7_6 Available: xorg-x11-server-Xorg-1.20.1-5.3.el7_6.x86_64 (updates) xorg-x11-server-Xorg(x86-64) = 1.20.1-5.3.el7_6 Available: xorg-x11-server-Xorg-1.20.1-5.6.el7_6.x86_64 (updates) xorg-x11-server-Xorg(x86-64) = 1.20.1-5.6.el7_6

Generic placeholder image

2019 Sep 15, 18:09:53

I need a help please, I get this error when I try to start xdrp service on CentOS 7 "# systemctl start xrdp.service Failed to start xrdp.service: Unit not found."

Generic placeholder image

2020 Mar 10, 14:03:37

Hey There. I found your blog using search. This is a well crafted really article. I'll be sure to bookmark it and come back to read more of your useful information. Thanks a lot for the post. I'll be back :)

Generic placeholder image

2020 Sep 10, 09:09:43

Hi, thanks, i followed along and it worked. my login screen is exactly same as per this article second last image. how to check weather its using xfce or mate desktop ? is it possible to switch that as well? thanks in advance

Leave A Comment