How to Install Xrdp Server (Remote Desktop) on Ubuntu 20.04

How to Install Xrdp Server (Remote Desktop) on Ubuntu 20.04

Xrdp is an open source implementation of Microsoft's Remote Desktop Protocol (RDP) that allows you to control a remote system through a graphical interface. With RDP, you can log in to a remote machine and create a real desktop session just like you would if you were logged in to the local machine.

This tutorial explains how to install and configure Xrdp server on Ubuntu 20.04.

1. Install the desktop environment

Ubuntu servers are typically managed using the command line and do not come with a desktop environment installed by default. If you are running Ubuntu Desktop, ignore this step.

There are many desktop environments for you to choose from in the Ubuntu source repository. One option is to install Gnome, which is the default desktop environment for Ubuntu 20.04. Another option is to install xfce. It is a fast, stable, and lightweight desktop environment, making it an ideal desktop for remote servers.

Run any of the following commands to install the desktop environment of your choice:

Install Gnome

sudo apt update
sudo apt install ubuntu-desktop

Install Xfce

sudo apt update
sudo apt install xubuntu-desktop

Depending on your system, downloading and installing the GUI packages may take some time.

2. Install Xrdp

Xrdp is included in the default Ubuntu software repositories. To install it, run:

sudo apt install xrdp

Once the installation is complete, the Xrdp service will start automatically. You can verify it by typing:

sudo systemctl status xrdp

The output will look like this:

● xrdp.service – xrdp daemon
Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2020-05-22 17:36:16 UTC; 4min 41s ago
...

By default, Xrdp uses /etc/ssl/private/ssl-cert-snakeoil.key which is only readable by the "ssl-cert" user group. Run the following command to add the xrdp user to this user group:

sudo adduser xrdp ssl-cert

Restart the Xrdp service to make the changes take effect:

sudo systemctl restart xrdp

that's all. Xrdp has been installed on your Ubuntu server and you can start using it.

3. Xrdp Configuration

Xrdp configuration files are located in the /etc/xrdp directory. For basic Xrdp connections, you don't need to make any changes to the configuration files.

Xrdp uses the default X Window desktop environment (Gnome or XFCE).

The main configuration file is named xrdp.ini. This file is divided into different sections, allowing you to set global configuration, such as security, listening addresses, creating different xrdp login sessions, etc.

Whenever you make changes to the configuration file, you need to restart the Xrdp service.

Xrdp uses the startwm.sh file to start an X session. If you want to use another X Window desktop, edit this file.

4. Configure the firewall

The Xrdp daemon listens on port 3389 on all network interfaces. If you are running a firewall on your Ubuntu server, you need to open the Xrdp port.

To allow access to the Xrdp server from a specific IP address or IP range, for example 192.168.33.0/24 , you need to run the following command:

sudo ufw allow from 192.168.33.0/24 to any port 3389

If you want to allow access from anywhere (which is discouraged for security reasons), run:

sudo ufw allow 3389

For added security, you might consider having Xrdp listen only on localhost, and creating an SSH tunnel to encrypt the traffic from port 3389 on your local machine to the same port on the remote server.

5. Connecting to Xrdp Server

Now that you have set up your Xrdp server, it's time to open your Xrdp client and connect to the server.

If you have a Windows computer, you can use the default RDP client. Type "remote" in the Windows search bar and click "Remote Desktop Connection". This will open an RDP client. Enter the remote server IP address in the "Computer" area and click "Connect".

On the login screen, enter your username and password and click OK.

Once logged in, you will see the default Gnome or Xfce desktop, which should look like this:

You can now interact with the remote desktop using your keyboard and mouse from your local machine.

If you're running macOS, you can install the Microsoft Remote Desktop app from the Mac App Store. Linux users can use an RDP client such as Remmina or Vinagre.

VI. Conclusion

Configure a remote desktop that allows you to manage your Ubuntu 20.04 server from your local machine through an easy to use graphical interface.

This is the end of this article on how to install Xrdp server (remote desktop) on Ubuntu 20.04. For more information about installing Xrdp server on Ubuntu 20.04, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • How to connect to Alibaba Cloud Ubuntu 16.04 server from local Windows remote desktop

<<:  Detailed explanation of JavaScript upload file limit parameter case

>>:  Simple use of Vue bus

Recommend

DHTML objects (common properties of various HTML objects)

!DOCTYPE Specifies the Document Type Definition (...

CSS delivery address parallelogram line style example code

The code looks like this: // Line style of the pa...

One line of CSS code to achieve the integration of avatar and national flag

It’s National Day, and everyone is eager to celeb...

The textarea tag cannot be resized and cannot be dragged with the mouse

The textarea tag size is immutable Copy code The c...

Analysis of Facebook's Information Architecture

<br />Original: http://uicom.net/blog/?p=762...

Angular Dependency Injection Explained

Table of contents Overview 1. Dependency Injectio...

In-depth explanation of closure in JavaScript

Introduction Closure is a very powerful feature i...

Problems encountered by MySQL nested transactions

MySQL supports nested transactions, but not many ...

Vue Basics Listener Detailed Explanation

Table of contents What is a listener in vue Usage...