How To Install XRDP on Ubuntu 20.04

Table of Contents

How To Install XRDP on Ubuntu 20.04





It’s an open-source implementation of the Microsoft Server for providing fully functional RDP access to remote desktops to operating systems other than Microsoft Windows. Security issues are minimal when using the xrdp service on your internal network. In contrast, there are others who would like to increase the security level of the XRP solution. One of the most common methods of creating a secure connection with Linux is to use SSH to create secure connections between clients and servers.






Let’s get started,





Step 1: Setting up the desktop environment






Remote desktops are not commonly installed on Linux Servers. The first step to connecting through a GUI is to install it. First, update your system using following command.


# apt-get update && apt-get upgrade -y



To install a desktop environment, run the Tasksel utility,  


# apt install tasksel -y



Run Tasksel by typing the following command,



# tasksel




You’ll see a new interface where you will find Ubuntu desktop using the arrow key. Once you have installed all the packages, make sure your system will boot into the GUI. Use the following command to do so,


# systemctl set-default



To apply the changes, restart your system.







Step 2: Installing XRDP






Run the following command to install a remote desktop on your Ubuntu system,



# sudo apt install xrdp -y





If XRDP installation is successful, its service will be automatically started. Run the following command to check the service status,





# sudo systemctl status xrdp 







Step 3: Configuring Xrdp






In order to initiate a remote desktop session, the XRP server uses the certificate key file “/etc/ssl/private/ssl-cert-snakeoil.key”. To make sure it works correctly, add the user xrdp to the group “ssl-cert” with the command below,



# sudo usermod -a -G ssl-cert xrdp



Run the following command to restart the Xrdp service,



# sudo systemctl restart xrdp








Step 4: Adjust Firewall







Port 3389 is used by XRDP, the RDP protocol’s default port. The firewall must be configured to allow remote systems access to port 3389. If you are using UFW firewall, you can open port 3389 for the LAN network using the following command.




# sudo ufw allow from to any port 3389





You will need to reload the UFW to apply the new rules. Use the following command to do so,


# sudo ufw reload





You can now access your system via RDP.




We have successfully installed the Xrdp service and are ready to connect.



Start the RDP client on Windows and enter the IP address of the Ubuntu system. In the run window or command line, type “mstsc” to launch the RDP client.


Authentication is required once the remote system has established a connection. You must enter the credentials of the remote Ubuntu system to access the remote desktop.





I hope you have found this article useful, and I hope you have gotten some of information from it.





Try VPSie for free today!

Share on