Ubuntu servers come equipped with a command line interface as default. The Command Line Interface or CLI is a text-based interface so it consumes low hardware resources and can also run well on a low-resolution screen. GUI on the other hand requires more hardware resources and a high-resolution screen in most cases.
The Xrdp is an open-source implementation of the Microsoft Remote Desktop Protocol (RDP) that allows to graphically control of a remote system. Users can remotely access the Linux desktop using an RDP client if Xrdp is installed.
This guide will describe the steps to install ubuntu-desktop and Xrdp on Ubuntu 22.04 LTS.
Step 1: Install Ubuntu desktop
SSH access to the Ubuntu server as root or a sudo user.
Install Ubuntu minimal desktop package in Ubuntu using the below command.
# apt install ubuntu-desktop-minimal -y
Step 2: Install Xrdp in the server
Install the Xrdp package using the following command.
# apt install xrdp -y
Check the Xrdp status using the following command.
# systemctl status xrdp
Step 3: Configure ufw firewall
If the server does not have a firewall enabled, skip step 3.
Use the following commands to allow RDP port 3389. After allowing the port, reload and check the ufw status, and reboot.
# ufw allow 3389
# ufw reload
# ufw status
# reboot
Step 4: Access server using Remote Desktop Connection
Access the Ubuntu desktop system from Windows using the Remote Desktop Client
.
Click on the Yes
button to proceed with the connection.
Input the login credentials and click on the OK
button.
Once the correct logins are entered, the desktop screen of the remote Ubuntu desktop system is shown in the below image.
Related tutorials