How To Install XRDP (Remote Desktop) on Ubuntu 20.04

Introduction

Xrdp is an open-source implementation of the Microsoft Remote Desktop Protocol (RDP) that allows you to graphically control a remote system. With RDP, you can log in to the remote machine and create a real desktop session the same as if you had logged in to a local machine.

This tutorial helps you to Install Remote Desktop (XRDP) on Ubuntu 20.04 Linux system. Also provides the instructions to install a Desktop environment on your system.

Step 1: Log into Ubuntu 20 Server

You will need to log in your Ubuntu server first.

Please refer to https://www.databasemart.com/blog/connect-to-linux-servers-remotely to log into the Ubuntu server via SSH.

Step 2: Install ubuntu-desktop Environment

Ubuntu servers are managed from the command line and do not have a desktop environment installed by default. If you run the desktop version of Ubuntu, skip this step.

There are various desktop environments available in Ubuntu repositories that you can choose. One option is to install Gnome, which is the default desktop environment in Ubuntu 20.04.

To install the ubuntu-desktop environment, please issue the following commands in the terminal session.

sudo apt install ubuntu-desktop
install ubuntu-desktop
install ubuntu-desktop

Step 3: Install XRDP

sudo apt install xrdp
install xrdp

Step 4: Open port 3389 on the firewall

sudo ufw allow 3389/tcp
sudo ufw allow 3389/tcp

Step 5: Test XRDP connection

Enter win+R on the keyboard and type “mstsc” to launch the Remote Desktop Connection application. Input your hostname or the server IP.

sudo ufw allow 3389/tcp

Input username “administrator” and the server password, then click “OK” to connect to the Ubuntu 20 server.

sudo ufw allow 3389/tcp

Now you are successfully logged in.

sudo ufw allow 3389/tcp