ubuntu logo

Ubuntu 20.04/20.10: How to enable RDP access from Windows PC.

Spread the love

There have been a number of times that I have wanted to access my Ubuntu 20.04/20.10 PC from a Windows PC using Remote Desktop Access (RDP). This is how I have configured it to work.

Enable RDP on the Ubuntu 20.04/ 20.10 PC:

Open the terminal and type the following command:

sudo apt install xrdp
Ubuntu 20.04/20.10 - How to enable RDP access from Windows PC.
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 1

Type your password and enter.

RDP - Password
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 2

Enter Y and enter.

RDP - Type Y
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 3

Xrdp will be installed:

RDP - Installing
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 4

Once installed the installer will return to the command line:

RDP - Done
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 5

Enable xrdp to start after reboot and to run now type:

sudo systemctl enable --now xrdp
RDP - enable
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 6

The command will run and then return to the command line:

RDP - Done
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 7

Run the following command to open the rdp port on the local firewall for incoming traffic.

sudo ufw allow from any to any port 3389 proto tcp
RDP - Open Firewall
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 8

The rules will be added:

RDP - Done
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 9

Run the following command to find the ip address of the machine. This will be needed to rdp from the windows machine.

sudo ip a

The ip address of the machine is highlighted in red:

RDP - Get IP
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 10

This is all you have to do on the Ubuntu PC. Now go onto the windows PC and connect to the Ubuntu PC as follows:

Connecting to the Ubuntu PC from Windows using RDP.

Click on the start button and type mstsc. Click on Open.

RDP - Open RDP
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 11

Type in the ip address of the Ubuntu PC and click Connect.

RDP add IP
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 12

Click Yes.

RDP - Click Yes
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 13

Type the username and password and click OK.

RDP - Add user and password
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 14

You will now have access to the linux desktop. Yay.

RDP - Connected.
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 15

To log off again just click on the x of the RDP window or log out:

RDP - Logout
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 16
RDP - Logout
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 17

Troubleshooting:

Black Screen at logon:

If there is a user logged in on the Ubuntu PC you may get a black screen when you rdp to the PC. This can be resolved by logging off of the Ubuntu PC.

For more things to do with your new Ubuntu 20.10 Desktop go to my other articles HERE.

Authentication Required login

In some cases you will get the following window appear and even though you log in it will not disappear:

Ubuntu 20.04/20.10: How to enable RDP access from Windows PC.
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 18

A permanent fix for this is to edit the following file:

sudo vim /usr/share/polkit-1/actions/org.freedesktop.color.policy
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC.
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 19

Go to the defaults section and modify no to yes

<defaults>
    <allow_any>auth_admin</allow_any>
    <allow_inactive>yes</allow_inactive>
    <allow_active>yes</allow_active>
</defaults>
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC.
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 20

To:

Ubuntu 20.04/20.10: How to enable RDP access from Windows PC.
Ubuntu 20.04/20.10: How to enable RDP access from Windows PC. 21

Save the changes and log off and back on again and you should not see the popup again.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top