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

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

Linux Ubuntu VPS

Introduction

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.

1xrdpu

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

2xrdpu

Installing the graphical shell on your server.

apt-get install xubuntu-desktop

3xrdpu

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

8xrdpu

You need to install the xfce window manager.

apt-get install xfce4

4xrdpu

Configuring xrdp

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

9xrdpu

Restart the xrdp service to accept the settings.

10xrdpu

Adding and configuring a user

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

adduser *nameofuser*

5xrdpu

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

6xrdpu

In the config file write this parameter.

xfce4-session

This parameter allows the remote connection of the chosen user.

Result

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

11xrdpu

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

mstsc

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

12.1xrdpu

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.

13xrdpu

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

14xrdpu

Output

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.

Vote:
5 out of 5
Аverage rating : 5
Rated by: 1
1101 CT Amsterdam The Netherlands, Herikerbergweg 292
+31 20 262-58-98
700 300
ITGLOBAL.COM NL
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.