Raspberry Pi: Set Up Remote Desktop Connection (RDP) – Windows PC

This guide shows how to set up a Remote Desktop Connection with a Raspberry Pi using RDP on a Windows PC. The Remote Desktop Protocol (RDP) is the proprietary network protocol developed by Microsoft to connect to a remote desktop computer and access its graphical user interface. This allows you to connect your Windows PC to your Raspberry Pi and control its GUI remotely.

Raspberry Pi Setup Remote Desktop Connection RDP Windows PC

We have a similar guide for Mac OS computer: Raspberry Pi: Set Up Remote Desktop Connection (RDP)

Prerequisites

Before proceeding, make sure you check the following prerequisites.

xrdp (open-source Remote Desktop Protocol Server)

xrdp provides a graphical login to remote machines using RDP (Microsoft’s proprietary Remote Desktop Protocol). xrdp accepts connections from a variety of RDP clients. We’ll be using Microsoft Remote Desktop Client for Windows (but it’s also compatible with Mac OS, iOS, and Android).

xrdp allows you to connect to your Raspberry Pi to control its desktop remotely.

Please note that your Raspberry Pi must be running a full Raspberry Pi OS – it will not work with a headless or Lite OS.

Installing xrdp on Raspberry Pi (Remote Desktop Protocol)

Having an SSH connection established with your Raspberry Pi, update and upgrade your Raspberry Pi, if any updates are available. Run the following command:

sudo apt update && sudo apt upgrade -y

Next, we need to install the xrdp software on your Raspberry Pi:

sudo apt install -y xrdp

That’s it. You don’t need to change any configurations, everything will work out of the box with the default settings.

Finally, run the following command to get the Raspberry Pi IP address. You’ll need the IP address to establish the remote connection.

hostname -I
Raspberry Pi IP Address

Remote Desktop Connection Software – Windows PC

The Remote Desktop Connection software is installed on all Windows PCs by default. Click the search bar.

Windows PC Search bard

Search for “Remote Desktop Connection” and open the App:

Search for Remote Desktop connection RDP software Windows PC

Type the Raspberry Pi IP address in the computer field and press the Connect button:

Remote Desktop Connection software type Raspberry Pi IP Address

Click the “Yes” button to establish the connection.

Remote Desktop Connection software accept connection yes option

Next, type your Raspberry Pi username and password and click the “OK” button to login into your device.

xrdp connect to Raspberry Pi Username and Password

You might be prompted one more time for the authentication if you just powered your Raspberry Pi, so enter again your username and password.

Raspberry Pi Authentication username and password

That’s it! You can now control your Raspberry Pi desktop computer remotely from a Windows PC.

Raspberry Pi IP Address RDP Establish Remote Desktop Connection

Wrapping Up

In this tutorial, you learned a very convenient, practical, and easy way to establish a remote connection with your Raspberry Pi using xrdp. This is our favorite method to access the Raspberry Pi desktop because you don’t have to connect an additional screen, keyboard, and mouse. You can also use RDP on a Mac OS computer.

We hope you found this tutorial useful. You can check all our Raspberry Pi projects on the following link:

Thanks for reading.



Learn how to build a home automation system and we’ll cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database DOWNLOAD »
Learn how to build a home automation system and we’ll cover the following main subjects: Node-RED, Node-RED Dashboard, Raspberry Pi, ESP32, ESP8266, MQTT, and InfluxDB database DOWNLOAD »

Enjoyed this project? Stay updated by subscribing our newsletter!

19 thoughts on “Raspberry Pi: Set Up Remote Desktop Connection (RDP) – Windows PC”

    • According to what I’ve researched and tested, RDP is faster. VNC literally shows physical display of what the remote user sees while RDP creates virtual desktop (uses less resources).

      Reply
      • I had to do the line
        #dtoverlay=vc4-kms-v3d
        Comment out because when I opened vscode or chronium the display of the windows was not correct because the GPU was interfering. Interestingly, I was able to re-enable it after running vscode a few times. The first time, at the beginning of the year, I did it in a different place, where I commented out GPU. but don’t know where anymore. But that’s how it worked because I depend more on programming.

        Reply
  1. os links no email não estão a apontar para esta pagina. tal como algumas pessoas indicam. qual a diferença entre o vnc e rdp em termos de funcionalidades neste caso?

    Reply
    • (I’ll reply in English)
      Thanks for letting me know, I already reported the issue, I hope it gets fixed soon.

      According to what I’ve researched and tested, RDP is faster. VNC literally shows physical display of what the remote user sees while RDP creates virtual desktop (uses less resources).

      Reply
  2. Interestingly, when I first connected my PC to mt RPi4B which is already attached to a monitor, keyboard, and mouse, the RPi startup screen appeared with none of the applications that showed on the monitor. I started a file manage, a terminal, and raspi config and they showed up on the xrdp window on my PC. I started a Firefox browser and it showed on the PC window, but in a completely garbled state. None of these show on the directly connected monitor.
    Then I tried the Chromium browser and it displayed on the directly connected monitor but not on the xrdp screen.
    I’m not sure what is going on, but my RPi seems confused.
    Thanks for the article, I’ll continue to play with it.
    Dan

    Reply
  3. This works well. However, like Dan, I found the screens for Firefox and Chromium to be completely scrambled on the xrdp screen on my Windows 11 laptop.

    Reply
  4. Very help and as well as slightly more responsive than TigerVNC I had been using.
    Had same garbled screen with Chromium and Firefox browsers. But commenting off the line as mentioned by Claudius sorted it out:

    sudo vi /boot/config.txt
    — found and comment out the line with “dtoverlay=vc4-fkms-v3d”
    — saved and rebooted.

    Reply
  5. I have been accessing a remote RBPi3 using xrdp for months. I mainly run a Thonny instance on the RBpi to tune a Python IoT application that in turn runs on an ESP32 controlled by the Pi. Complex stuff 🙂 Anyhow, some occasional (probably bad Wi-Fi related) visual problems set aside, everything has worked very, very well.

    I also have and old Linx tablet that used to have Windows 8. I replaced it with Debian 12 (32-bit) and I can access it using xrdp, once again. The xrdp daemon is the only remote utility that has been reliable and fast enough when used with low-end devices, and that said with almost 20 years of VNC related experience.

    Reply
  6. Still no luck with browsers. I have tried commenting out the dtoverlay line in /boot/config.txt, but then the monitor attached to the RPi is blank after booting.

    I tried dtoverlay=vc4-kms-v3d and dtoverlay=vc4-fkms-v3d with the same results:
    Firefox browser window is scrambled
    Chromium browser wind is displayed on the RPi monitor and works fine there but is not controllable from the xrdp window on the PC.

    I tried dtoverlay=vc4-kms-v3d-pi4 and now both Chromium and Firefox browsers display on the xrdp window but scrambled and unusable.

    I found this thread :
    https://forums.raspberrypi.com/viewtopic.php?t=358637
    and tried one of the solutions- in xrdp screen terminal window enter
    firefox –safe-mode
    This brings up an error message and a dialog. I clicked ‘continue’ and the Firefox bowser opened with a beautiful page. I tried several sites and everything seems to work.
    Unfortunately, now when trying to open Firefox on the RPi monitor, it opens in the xrdp window.
    So, for now, I can use Firefox in the xrdp window on my PC and Chromium in the real monitor. I can live with this, but I don’t understand it.

    Reply
    • I finally have a headless Raspberry Pi 5B and am using it with xrdp. After commenting out the dtoverlay line in /boot/config.txt, both chromium and Firefox browsers work. They are pretty slow in startup, however, after they are on-screen, they work fine.

      Reply

Leave a Comment

Download Our Free eBooks and Resources

Get instant access to our FREE eBooks, Resources, and Exclusive Electronics Projects by entering your email address below.