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

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.

Type your password and enter.

RDP - Password

Enter Y and enter.

RDP - Type Y

Xrdp will be installed:

RDP - Installing

Once installed the installer will return to the command line:

RDP - Done

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

sudo systemctl enable --now xrdp
RDP - enable

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

RDP - Done

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

The rules will be added:

RDP - Done

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

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

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

RDP add IP

Click Yes.

RDP - Click Yes

Type the username and password and click OK.

RDP - Add user and password

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

RDP - Connected.

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

RDP - Logout
RDP - Logout

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:

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

sudo vim /usr/share/polkit-1/actions/org.freedesktop.color.policy

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>

To:

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