How to install Xrdp on Ubuntu 20.04 LTS
The Xrdp is an open-source implementation of the Microsoft Remote Desktop Protocol (RDP) that allows to graphically control a remote system. Users can remotely access the Linux desktop using an RDP client if Xrdp is installed.
Install Xrdp on Ubuntu 20.04
This guide will describe the steps to install Xrdp on Ubuntu 20.04 LTS.
- Take SSH access to the Ubuntu server as root or a sudo user.
- Run the repository update with the below command before proceeding the installation.
# apt update -y
# apt upgrade -y
- Install Gnome desktop package in Ubuntu using the below command.
# apt install ubuntu-desktop
- Also during the installation of Xrdp a DNS nameserver error may occur. You can set the DNS nameservers to default google using cmd: nano /etc/resolv.conf
- Now you need to install Xrdp using the following command.
# sudo apt install xrdp -y
- The installation will run, and it will take few minutes to complete.
- Once the xrdp installation finished successfully, its service will be started automatically. To verify the service status run the command: sudo systemctl status xrdp
- Once the installation is completed, it is recommended to change the default Xrdp port 3389 to any alternative port for security purposes. For example, here we are changing the default Xrdp port with 3650 using the following command.
# sed -i 's/3389/3650/g' /etc/xrdp/xrdp.ini
- Then allow that particular port through UFW with the below command.
You can install UFW with
# sudo apt install ufw
# ufw allow 3650
- Now restart the Xrdp process by using the below command.
# systemctl restart xrdp
- Access the Ubuntu desktop system from Windows VPS using the Remote Desktop Client.
- Click connect and ignore the certificate errors and click on the ‘Next’ button to proceed with the connection.
- You will get the Xrdp login page, now provide your login credentials and click
- Once the correct logins are entered, you will get the desktop screen of the remote Ubuntu desktop system as shown in the below image.
Through this article, I showed you how to install Xrdp on Ubuntu 20.04 complete.
Hope you can do it successfully