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.

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:

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

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.

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.

To:

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

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

2 thoughts on “Ubuntu 20.04/20.10: How to enable RDP access from Windows PC.”

  1. I attempted to use the command:

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

    All I get is that ‘vim’ is not a known command.

    Quite the newbie with Linux here – and been reading articles as I encounter issues. Between the RDP craziness and the WiFi issues – I am going bananas. I was playing with DEBIAN 10 – and never could get WiFi. Switched to Ubuntu 20.04 and it auto detected my wifi card and installed it.

    1. OK. I figured out the VIM thing. I had to install it.

      Got is installed. I edited the file as you described, saved it. Rebooted. Ran the VIM command again, and it looks like the changes are still in the file….but, RDP into the box again, and I am still getting that annoying second PW prompt.

Leave a Comment

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

Scroll to Top