Serverspace Black Friday
November 24, 2022
Updated November 24, 2022

How to install and configure xrdp on a Linux Ubuntu 20.04 server

Linux Ubuntu VPS


Faced with the need to use Linux remotely with a graphical shell ? Then this publication is for you, because I'm going to break down the installation of xrdp on the Linux operating system Ubuntu 20.04.

Xrdp was developed back in 2004 and is still being updated. You don't have to worry about security, because the developers provide the source code of the program.

Getting started

You can use Xrdp on any version of Ubuntu, with or without a graphical shell.

Let's check what version of the operating system is installed.


I will use the version with no graphical shell in my example. If you have a version with a graphical shell you can skip this point and follow the instructions below.

Installing the graphical shell

Before you start working with the server, you need to update your system.

sudo apt-get update && apt-get upgrade


Installing the graphical shell on your server.

apt-get install xubuntu-desktop


You have to wait for a while until the system installs everything you need.

Installing xrdp

Run the command to install xrdp on your server.

apt-get install xrdp


You need to install the xfce window manager.

apt-get install xfce4


Configuring xrdp

Add xfce to the xfce desktop window manager autorun by fixing the configuration file "/etc/xrdp/" with any text editor of your choice.


Restart the xrdp service to accept the settings.


Adding and configuring a user

After configuring Xfce you will need to add a user to connect using the rdp protocol.

adduser *nameofuser*


To be able to connect, you need to create an xfce configuration file in the user's local folder, use any text editor of your choice.

nano /home/*youruser/.xsession


In the config file write this parameter.


This parameter allows the remote connection of the chosen user.


In my example I used a VPS server, with ssh keys connection, so I need to change the password from the root user. If you know the superuser password, you can skip this point.

sudo passwd root


Run the remote connection utility by typing the command in the execute window.


In the window that appears, enter the ip address of our server.


You can find out the ip-address of your server using the command.

ip addr show

Note: When you connect to the server, pay attention to your keyboard layout, because after you connect to the server the current layout will be set.

For authorization we use the previously created user.


After booting the system, it is required to enter a password from the superuser.



Xrdp not only allows you to connect remotely to one user with the RDP protocol, but to several users at once by creating them beforehand.
With each user connected to the server, the memory usage grows as well.
In this publication we installed and configured the xrdp service on an Ubuntu 20.04 server and connected remotely to it using the RDP protocol.

5 out of 5
Аverage rating : 5
Rated by: 1
1101 CT Amsterdam The Netherlands, Herikerbergweg 292
+31 20 262-58-98
700 300
700 300
We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.