How to install the XRDP (Remote Desktop) server on Centos 8

s2 0

XRDP is an open source implementation of the Microsoft Remote Desktop (RDP), with which you can control your system graphically. With RDP, you can log in to the remote computer just as you logged in to the local computer. It uses port 3389 for its connection. In this tutorial we will look at how to set up the remote desktop connection on Centos 8.

Install the CentOS desktop environment

In general, Linux servers do not have a remote desktop installed. If you want to connect using a GUI, you need to install it first. GNOME is the default desktop environment in Centos 8. To install GNOME on your remote computer, open Terminal and run the following command:

# dnf groupinstall "Server with GUI"

Depending on your system, downloading and installing the GNOME packages and dependencies may take some time.

Install XRDP

XRDP is available in EPEL Software repository. If EPEL is not enabled on your system, enable it by typing the following command:

# dnf install epel-release

Now install the XRDP package.

# dnf install xrdp

Install XRDP

Once the installation is complete, activate and start the XRDP service.

# systemctl enable xrdp

# systemctl start xrdp

Enter the following command to verify that XRDP is running:

# systemctl status xrdp

When the XRDP service is running, the output should look like the following figure:

Check RDP status

You can also check the XRDP service status with the following command:advertising

# netstat –atnp | grep 3389

Check the RDP port

Port should listen like this:

Result of the port check

Configure XRDP

The configuration file is /etc/xrdp/xrdp.ini. By default, XRDP uses the Windows desktop, in our case GNOME. You do not have to make any changes to the configuration file for the connection. This file is divided into different sections and allows you to set global configuration settings like security and listening address as well as to create different XRDP login sessions.

Open configuration file /etc/xrdp/xrdp.ini and add the following line to the end of the file.

exec gnome-session

After adding the above line, restart the XRDP service with the following command:

# systemctl restart xrdp

Configure the firewall

If your firewall is running on your Centos 8, just add the rule to allow the XRDP port / service to allow traffic for the XRDP connection.

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

# firewall-cmd –reload

Connect to the XRDP with Windows computer

Windows uses a remote desktop client by default. How to connect through Centos 8 with the remote desktop type Remote desktop connection in the Windows search bar and press Enter.

Windows RDP client

Enter the IP address of the remote computer and click Connect.

Remote desktop connection

You will be prompted for the credentials login screen. Enter Username and password and click on OK.

XRDP login

After logging in, you should see the default GNOME desktop. You can now interact with the remote machine.

If you are using Mac OS, install the Microsoft Remote Desktop application from the Mac App Store, while Linux users will install RDP clients such as reminder or vinegar.

diploma

In this tutorial we learned how to configure Remote Desktop Connection in Centos 8 and access it from a Windows computer. With XRDP, you can manage and control your computer from your local desktop computer using a graphical user interface.

How to install the XRDP (Remote Desktop) server on Centos 8