How to take a Remote Desktop Session of Ubuntu 20.04/18.04 from Windows Operating System

xrdp is a free and open-source implementation of the Microsoft Remote Desktop Protocol (RDP) which allows you to graphically control a remote system. It will accept the connections from various Remote Desktop clients such as rdesktop, FreeRDP NeutrinoRDP and Microsoft Remote Desktop Client (for Windows, macOS, iOS and Android). This post explains to install and configure xrdp on Ubuntu 20.04 LTS Desktop.
1. Running instance of Ubuntu 20.04 LTS Desktop with GUI
How to install GNOME GUI (Graphical User Interface) on Ubuntu 20.04 LTS Server
2. Internet access to download required packages
3. root or sudo privileges

Let’s get started!

Command to find IP Address of Ubuntu 20.04 Desktop LTS System.
$ sudo ip a |grep -i inet
Step 1: Install xrdp package
Execute the following command to install xrdp package from terminal.
$ sudo apt install xrdp
Step 2: Start and enble xrdp service
Once installation is done, xrdp.service started, if not start and enable with following commands.
$ sudo systemctl start xrdp.service
$ sudo systemctl enable –now xrdp
$ sudo systemctl status xrdp.service
Step 3: Open xrdp listening port on Firewall
Open or allow tcp port 3389 on firewall if system firewall is in installed or enabled. Execute following command to open port on UFW system firewall.

Allow only from specific IP Address or range:
$ sudo ufw allow from to any port 3389

Allow from anywhere:
$ sudo ufw allow 3389/tcp
Warning: It’s highly discourage not to allow from anywhere. Use specific IP Address or IP range only.
Step 4: Take a Desktop session from Windows running system to test the working of xrdp
Login on windows system to take a remote desktop session. To open run window, press Windows key + R and type mstsc and click on ‘OK’ as shown below screenshots.

Type IP Address of Ubuntu 20.04 LTS Desktop and click on ‘Connect’ button.

It should open RDP connection, fill up with the username and password of Ubuntu 20.04 LTS desktop to connect. 
Create user and set password if the user doesn’t exist with following command.
$ sudo adduser teclues

You are now remotely connected to Ubuntu 20.04 LTS desktop from Windows machine.

Conclusion: In this tutorial, we have seen How to take a remote desktop session of Ubuntu 20.04 LTS Desktop from Windows System. Big thanks for reading all the way to the end. Please share it with Your Friends & Help Someone… and also Like Our Facebook Page. Let me hear your thoughts in the comments below!

Leave a Comment