Before we begin talking about how to install Xrdp Server on Ubuntu 20.04, let’s briefly understand – What is Xrdp?
Xrdp is open-source software that facilitates remote access to Linux systems. It stands for "X Remote Desktop Protocol" and serves as a bridge between a client and a server. With Xrdp, users can remotely connect to Linux systems using Windows or Mac devices. It provides a seamless and secure way to manage files, run applications, and perform various tasks on a remote desktop. Discover more about Xrdp and how it simplifies remote desktop access.
In this tutorial, you will install Xrdp Server in an independent environment on Ubuntu 20.04. We will also address a few FAQs on how to install Xrdp Server on Ubuntu 20.04.
Advantages of Xrdp Server
- Remote Access: Xrdp allows users to connect to a Linux system remotely, accessing the desktop environment from any Windows or Mac device.
- Platform Compatibility: It enables users to connect to Linux servers irrespective of the operating system they are using.
- Easy Setup: Xrdp simplifies the process of setting up and configuring remote desktop access, providing a user-friendly experience.
- File Transfer: Users can transfer files seamlessly between local and remote systems, making it convenient for remote collaboration and file management.
- Security: Xrdp ensures secure connections by supporting encryption protocols, safeguarding sensitive data during remote desktop sessions.
Installing Desktop Environment
Ubuntu servers are controlled from the command line and do not come pre-installed with a desktop environment. If you use Ubuntu on your desktop, you may skip this step.
The Ubuntu repositories contain a variety of desktop environments from which you can choose. One choice is to install Gnome, which is the default desktop environment in Ubuntu 20.04. Another alternative is to install Xfce. It is ideal for usage on a remote server because of its fast, stable, and lightweight desktop environment.
Execute one 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
It may take some time to download and install GUI packages, depending on your system.
Xrdp is available in the Ubuntu default repositories. Run the command shown below to install it:
sudo apt install xrdp
Following installation, the xrdp service will start automatically. You can check it by typing:
sudo systemctl status xrdp
The output should look as shown below:
● 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 the /
/etc/ssl/private/ssl-cert-snakeoil.key file, which is only accessible to members of the "SSL-cert" group. To add the
xrdp user to the group, run the following command:
sudo adduser xrdp ssl-cert
In order for changes to take effect, restart the xrdp service:
sudo systemctl restart xrdp
There you go. Xrdp has been installed on your Ubuntu server and is ready for use.
/etc/xrdp contains the Xrdp configuration files. You do not need to modify the configuration files for simple Xrdp connections.
Xrdp uses the default X Window desktop environment (Gnome or XFCE).
xrdp.ini is the main configuration file. This file is divided into sections and lets you set global configuration settings such as security and listening addresses, as well as create separate xrdp login sessions.
You must restart the xrdp service after making any configuration file changes.
To start an X session, Xrdp uses the
startwm.sh file. Edit this file if you want to use a different X Window desktop.
On all interfaces, the Xrdp daemon listens on port
3389. You must open the Xrdp port if your Ubuntu server is protected by a firewall.
To permit access to the Xrdp server from a specific IP address or IP range, for example,
192.168.33.0/24you would run the following command:
sudo ufw allow from 192.168.33.0/24 to any port 3389
If you wish to allow access from somewhere (which is highly discouraged for security reasons), run:
sudo ufw allow 3389
For increased safety, configure Xrdp to listen exclusively on localhost and create an SSH tunnel that securely forwards traffic from your local machine on port
3389 to the server on the same port.
Connecting to the Xrdp Server
Launch your Xrdp client and connect to it once your Xrdp server has been established.
The default RDP client is accessible if you have a Windows PC. Enter "remote" in the Windows search box and click on "Remote Desktop Connection". The RDP client will open as a result. Enter the IP address of the remote server in the "Computer" field and click "Connect".
On the login screen, enter your username and password before clicking on "OK."
After logging in, you should see the default Gnome or Xfce desktop. It should resemble the following:
You can now interact with the remote desktop from your local machine using your keyboard and mouse.
The Microsoft Remote Desktop program is available for download from the Mac App Store if you are using macOS. Linux users have access to RDP clients like Remmina or Vinagre.
FAQ to Install Xrdp Server on Ubuntu 20.04
Can I connect to Ubuntu 20.04 using Windows Remote Desktop Protocol (RDP)?
Yes, Xrdp Server on Ubuntu 20.04 enables Windows devices to connect using the native Remote Desktop Protocol (RDP).
How do I enable multiple users to connect via Xrdp on Ubuntu 20.04?
To allow multiple users to connect via Xrdp on Ubuntu 20.04, you need to configure the session manager. Edit the
/etc/xrdp/startwm.sh file and follow the instructions within to enable multiple sessions.
Are Xrdp connections secure?
Yes, Xrdp supports encryption protocols, providing a secure remote desktop connection between the client and the server.
Can I transfer files between local and remote systems using Xrdp?
Yes, Xrdp allows seamless file transfer between the local and remote systems, making it convenient for remote collaboration and file management.
What should I do if I encounter connection issues with Xrdp on Ubuntu 20.04?
Ensure that you have the latest version of Xrdp installed and check your firewall settings to make sure the necessary ports are open. You can also try restarting the Xrdp service.
Are there any alternative remote desktop solutions for Ubuntu 20.04?
Yes, alternative remote desktop solutions for Ubuntu 20.04 include VNC (Virtual Network Computing), TeamViewer, and NoMachine.
Can I use Xrdp Server on Ubuntu 20.04 with a Mac device?
Yes, Xrdp Server is compatible with Mac devices, allowing users to connect to Ubuntu 20.04 remotely using the Microsoft Remote Desktop client available for Mac.
By setting up a remote desktop, you can control your Ubuntu 20.04 server from a local system using a simple graphic interface.
If you have any suggestions or queries, kindly leave them in the comments section.