news
Serverspace has added a new Rocky Linux OS
BM
November 24, 2022
Updated June 7, 2023

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

Linux Ubuntu VPS

Using another OS?

Select the desired version or distribution.

Introduction

Faced with the necessity Linux remotely with a graphical shell ? Then that publication help you with that question, because I'm going to describe 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 OS pre-installed.

1xrdpu

In my example i use version with no graphical shell . If you have a GUI pre-installed oon your machine, you should 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 machine.

apt-get install xubuntu-desktop

3xrdpu

Wait for a while until the system installs everything you need.

Installing software

Follow the instructions to install the software on the machine.

apt-get install xrdp

8xrdpu

Install windows manager on your own machine.

apt-get install xfce4

4xrdpu

Configuring xrdp

Add xfce to the xfce desktop window manager autorun by fixing the config file "/etc/xrdp/startwm.sh".

9xrdpu

To accept all settings on your machine - reload.

10xrdpu

Adding and configuring a user

Add new user for RDP connection.

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.

Create xfce config in your user's local folder.

nano /home/*youruser/.xsession

6xrdpu

In the config file write this parameter.

xfce4-session

To add remote access, use this parameter of the chosen user.

Result

In my example I used a VPS server, with ssh keys connection, so I should change the password from the root user. But if you already know the superuser password, you should skip point.

sudo passwd root

11xrdpu

Start up remote connection utility.

mstsc

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

12.1xrdpu

You can find out the ip-address of your machine.

ip addr show

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

For authorization we use the previously created user.

Attention: If you are connecting via xRDP, you need to specify a password and root user name. If you are connecting via SSH, you will need the key or password that was configured during the creation of the server in the cloud.

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: 4
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.