Installation of XRDP on Ubuntu Server

Last updated December 6th, 2023 06:29

XRDP is an open-source implementation of the classic RDP protocol from Microsoft that allows you to remotely and graphically control your server. This enables you to log in to the server under a graphical user interface, just as if you were sitting directly at the machine. Let’s take a look on installation of XRDP on Ubuntu server.

Installation of XRDP on Ubuntu Server

Server Installing a Desktop Environment

By default, you can control Ubuntu Server using SSH and commands, but you don’t have any graphical user interface installed by default. There are two types of desktop environments for Ubuntu – Gnome and XFCE. It’s up to you to decide which one to choose. The default environment is Gnome, but XFCE is faster and less graphically demanding.

To install the Gnome desktop environment, log in to the server via SSH and run the following commands:

				
					sudo apt update
				
			
				
					sudo apt install ubuntu-desktop
				
			

To install the XFCE interface, log in to the server via SSH and run the command:

				
					sudo apt update
				
			
				
					sudo apt install xubuntu-desktop
				
			

Installing XRDP on Ubuntu Server

Since XRDP is in the official Ubuntu repository, all you need to do is to run the following command to install it:

				
					sudo apt install xrdp
				
			

Once you finish the installation, the XRDP service will automatically start, and you can verify its status using the command:

				
					sudo systemctl status xrdp
				
			

You will get the following output back:

● 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
  ...

The default configuration for XRDP uses the file /etc/ssl/private/ssl-cert-snakeoil.key, which is only readable by members of the ‘ssl-cert’ group. To add the XRDP service to this group, use the following command:

				
					sudo adduser xrdp ssl-cert 
				
			

Restart the XRDP service now with the command:

				
					sudo systemctl restart xrdp
				
			

After the restart, you have the XRDP service installed on your Ubuntu server.

Firewall Configuration

The XRDP daemon listens on port 3389. If you have the firewall (UFW) enabled on your server, you need to allow access to this port. You can either do this for “the whole world” or for a specific IP address.

To allow access for a specific IP address (replace the IP address in the command with your own, from which you will access XRDP), use the command:

				
					sudo ufw allow from 123.123.123.0/24 to any port 3389
				
			

If you want to have unrestricted access to XRDP from anywhere, use the command:

				
					sudo ufw allow 3389
				
			

Connecting to XRDP

On your Windows computer, open the native RDP client (search for “Remote Desktop Connection” in the Windows start menu).

In the “Computer” field, enter the IP address of your server.

připojení ke vzdálené ploše Windows

After connecting, you will see the following screen where you can enter your login credentials for the server (e.g. username: root and password: mysecretpassword).

Instalace XRDP na Ubuntu server

If you entered your login credentials correctly, you should now see a desktop similar to the one below. The graphical appearance will vary depending on the version of Ubuntu or the graphical interface you chose during installation.

Instalace XRDP na Ubuntu server

The website is created with care for the included information. I strive to provide high-quality and useful content that helps or inspires others. If you are satisfied with my work and would like to support me, you can do so through simple options.

Byl pro Vás tento článek užitečný?

Klikni na počet hvězd pro hlasování.

Průměrné hodnocení. 0 / 5. Počet hlasování: 0

Zatím nehodnoceno! Buďte první

Jak užitečný vidíte tento článek.

Sledujte mě na sociálních médiích.

Je mi líto, že pro Vás nebyl článek užitečný.

Jak mohu vylepšit článek?

Řekněte mi, jak jej mohu zlepšit.

newsletter

Subscribe to the Newsletter

Stay informed! Join our newsletter subscription and be the first to receive the latest information directly to your email inbox. Follow updates, exclusive events, and inspiring content, all delivered straight to your email.

Odebírat
Upozornit na
guest
0 Komentáře/ů
Vložené zpětné vazby.
Zobrazit všechny komentáře.

Pokud mi chcete napsat rychlou zprávu, využije, prosím, níže uvedený
kontaktní formulář. Děkuji.

Další Kontaktní údaje