In this tutorial, we will show you how to install XRDP on CentOS 8. For those of you who didn’t know, XRDP is an Open Source Remote desktop Protocol server, which allows you to RDP to your Linux server. The protocol has more capabilities than VNC, like attaching local drives or printers to the remote computer. It is capable of accepting connections from rdesktop, freerdp, and remote desktop clients on other platforms. If you are looking for something similar to a remote desktop for CentOS, you are in luck, XRDP is the answer.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo
‘ to the commands to get root privileges. I will show you through the step-by-step installation of XRDP (Remote Desktop) on a CentOS 8.
Prerequisites
- A server running one of the following operating systems: CentOS 8.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- A
non-root sudo user
or access to theroot user
. We recommend acting as anon-root sudo user
, however, as you can harm your system if you’re not careful when acting as the root.
Install XRDP on CentOS 8
Step 1. First, let’s start by ensuring your system is up-to-date.
sudo dnf clean all sudo dnf install epel-release sudo dnf update
Step 2. Installing Desktop Environment.
If you don’t have GUI/Desktop Environment installed on your CentOS 8, install it by using the following command:
sudo dnf groupinstall "Server with GUI"
Step 3. Installing Xrdp on CentOS 8.
XRDP is available in the EPEL software repository, Run the following command to install xrdp:
sudo dnf install xrdp
Once the installation is complete enable and start the XRDP service:
sudo systemctl enable xrdp --now sudo systemctl start xrdp
Step 4. Configure Xrdp.
The configuration files are located in the /etc/xrdp
directory. The main configuration file is named xrdp.ini
. This file is divided into sections and allows you to set global configuration settings such as security and listening addresses and create different xrdp login sessions.
Restart xrdp to load the new configuration:
sudo systemctl restart xrdp
Step 5. Configure Firewall.
Configure the firewall to allow RDP connections from external machines. The below command will add the exception for RDP port (3389):
sudo firewall-cmd --permanent --add-port=3389/tcp sudo firewall-cmd --reload
Step 6. Connecting to the XRDP server.
Windows, by default, uses the remote desktop client. Type “remote” in the Windows search bar and click on “Remote Desktop Connection”. This will open up the RDP client. In the “Computer” field, type the remote server IP address and click “Connect”.
Congratulations! You have successfully installed XRDP. Thanks for using this tutorial for installing the XRDP (Remote Desktop) in the CentOS 8 system. For additional help or useful information, we recommend you check the official XRDP website.