How to Setup Xrdp over Xorg in Linux with Multi Sessions

How to Setup Xrdp over Xorg in Linux with Multi Sessions

In today’s article, we are going to setup Xrdp over Xorg protocol along with some of its most useful tweaks that uses session’s manager for Graphical users.

Xorg an open-source and free to use software application to remotely access X Window System developed by X.Org. Xorg is considered to be most secure than the other tools which uses VNC protocols. It is generally used for the Linux/Unix platforms as the base for GNOME, KDE, and CDE desktop environments. Moreover, the Xorg is a client-server communication protocol to allow its secure communication over the same or different systems.

On the server side we will install xrdp and xorg Xrdp provides the graphical login interface to access the remote servers with GUI.


The prerequisites of this article is to have a remote Linux system running with GUI with sudo rights and a client system to connect with the remote server over xorg. The remote server also requires to have the internet access to install required packages.

Step 1: Installing Xorg and Xrdp packages:

Xorg and Xrdp both packages come within the default repositories whether you are using the latest Ubuntu or CentOS/RHEL Operating System.

As a demonstration, we are using the CentOS 7 Desktop. Let’s login to your system’s terminal or get its shell access using putty to run the command below.

# yum install xorg-x11-server-Xorg

This will install xrdp and the required xorg packages along with other dependencies. Type ‘y’ and hit enter to continue the installation.

Step 2: Configure XRDP over Xorg

After installing the packages, we need to configure Xrdp over Xorg protocol. Open the configuration file of Xrdp using any of your favorite editor the make the changes as shown below.

# vim /etc/xrdp/xrdp.ini









Comment out Xvnc parameters and uncomment Xorg settings as shown. Save and close the configurations and restart xrdp service.

# systemctl restart xrdp

After restarting the xrdp service, check its status or running service and port ‘3389’ in listening state.

# netstat –tlnp

Step 3: Accessing Remote XRDP Session

As we have made the required changes, now let’s make the Xrdp session over Xorg from your X windows system using it’s built in remote desktop protocol.

Step 4: Enabling Multiple Sessions using SEMAN:

In Xrdp, the default behavior of Linux GUI sessions manager using single user login is to share the session. But in most cases this creates a hurdle where multiple individual sessions are required using the standard credentials.

In order to enable multiple sessions, let’s open the sesman configuration file and update the session allocation policy from ‘Default’ to ‘UDBC’.

# vim /etc/xrdp/sesman.ini


Save the configuration file and restart ‘xrdp’ service.

# systemctl restart xrdp

Step 5: Testing Multi Sessions in XRDP

At this point we have done with all the required configurations to be able to run Xrdp over Xorg with multi sessions enabled, now let’s see how it works.

Open the remote desktop connections and login using the same user password.

Here you can see that we have a separate individual session under the same credentials, just like we have in new putty or terminal sessions.


At the end of this article, you should be able to run Xrdp over Xorg protocol, which far most secure and recommended over the XVNC protocols. We have also covered the sessions manager that how you can manage your remote connections by tweaking its configuration parameters which sometimes come in a challenging phase.

Similar Posts