Install xrdp on Raspberry Pi: Remote Desktop Setup Guide

By 

Updated on

3 min read

Raspberry Pi Xrdp Remote Desktop

xrdp is an open-source implementation of the Microsoft Remote Desktop Protocol (RDP) that lets you access a Raspberry Pi desktop from another computer.

It gives you a full graphical session from Windows, Linux, or macOS, which is useful when you want to manage the Pi without connecting a monitor, keyboard, and mouse directly. The Pi and the client machine need to be on the same network or reachable over the internet.

This tutorial shows how to install xrdp on Raspberry Pi OS and connect to your Pi over RDP.

Prerequisites

We assume that you already have Raspbian installed on your Raspberry Pi .

If you are using Raspberry Pi OS Lite and do not have a graphical desktop installed, you need to install one first. Otherwise, skip this section.

Current Raspberry Pi OS documentation uses the rpd-* packages to convert Lite into the X-based desktop needed for xrdp sessions. We will install that desktop stack here.

Log in to your Pi and run the following command:

Terminal
sudo apt update
sudo apt install rpd-x-core rpd-theme rpd-preferences rpd-applications \
  rpd-utilities rpd-developer rpd-graphics rpd-x-extras

Depending on your system, downloading and installing the desktop packages may take some time.

Once done, reboot the system for the changes to take effect:

Terminal
sudo reboot

Installing xrdp

The xrdp package is available in the default Raspberry Pi OS repositories. For the Xorg backend used by xrdp, install xorgxrdp as well:

Terminal
sudo apt install xrdp xorgxrdp

When the installation is complete, the xrdp service starts automatically. You can verify that it is running with:

Terminal
systemctl show -p SubState --value xrdp

The command prints running.

By default, xrdp uses the /etc/ssl/private/ssl-cert-snakeoil.key file, which is readable only by users in the ssl-cert group. You need to add the user that runs the xrdp server to that group.

Run the following command to add the user to the group :

Terminal
sudo adduser xrdp ssl-cert  

That is it. xrdp is installed on your Pi.

Connecting to Raspberry Pi

Now that you have set up the xrdp server, open your RDP client and connect to the Pi.

If you are a Windows user, you can connect to your Pi using the default RDP client. Type “remote” in the Windows search bar and click on “Remote Desktop Connection”. This will open up the RDP client. In the “Computer” field, enter the Raspberry Pi IP address and click “Connect”.

RDP Client

On the login screen, enter your Raspberry Pi username and password and click “OK”.

RDP Login

Once logged in, you should see the default Pixel desktop. It will look something like this:

Xrdp Pixel Desktop

You can now interact with the remote Raspberry Pi desktop from your local machine using your keyboard and mouse.

If you are using macOS, you can install the Microsoft Remote Desktop application from the Mac App Store. Linux users can use an RDP client such as Remmina or Vinagre.

Conclusion

Installing xrdp on Raspberry Pi gives you a simple way to manage the Pi with a full remote desktop session. If you also need terminal access, see how to enable SSH on Raspberry Pi .

Linuxize Weekly Newsletter

A quick weekly roundup of new tutorials, news, and tips.

About the authors

Dejan Panovski

Dejan Panovski

Dejan Panovski is the founder of Linuxize, an RHCSA-certified Linux system administrator and DevOps engineer based in Skopje, Macedonia. Author of 800+ Linux tutorials with 20+ years of experience turning complex Linux tasks into clear, reliable guides.

View author page