When it comes to remotely accessing your Raspberry Pi, you have a lot of options available, such as SSH and VNC. Yet another option available would be xrdp, which is the open source implementation of the Remote Desktop Protocol (RDP). RDP is commonly used on Windows systems, where it is installed by default, and other operating systems also like to implement this protocol in some capacity due to its widespread use and reliability.
If you would like to use an RDP client to access your Raspberry Pi, then all you will need to do is install the xrdp service on your system. In this tutorial, we will take you through the step by step instructions of downloading and installing xrdp on the Raspberry Pi, configuring it for remote logins, and then using a remote desktop client to access the Raspberry Pi. Let’s get started!
In this tutorial you will learn:
- How to install xrdp server on Raspberry Pi
- How to start, stop, and check status of xrdp service
- How to remotely connect to Raspberry Pi via xrdp server
|Category||Requirements, Conventions or Software Version Used|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
How to enable xrdp on Raspberry Pi step by step instructions
Follow along with the steps below to install Xrdp, apply the necessary configurations to the Raspberry Pi, and then use a remote desktop client (from Windows 11, in our case), to access the Raspberry Pi. Using xrdp on your Raspberry Pi allows you to connect to the device and use it in the same manner as if you were physically sitting in front of it.
- Start by installing xrdp with the following commands on your Raspberry Pi:
$ sudo apt update $ sudo apt install xrdp
- You can check to make sure that xrdp is running by executing:
$ sudo systemctl status xrdp
You can also use the following
systemctlcommands to change the behavior of the xrdp service:
Start or stop the service: $ sudo systemctl start xrdp $ sudo systemctl stop xrdp Enable or disable the xrdp service from auto-starting at boot: $ sudo systemctl enable xrdp $ sudo systemctl disable xrdp
- Now we must choose which users will have the ability to remotely log in to the Raspberry Pi via xrdp. Add those users to the
ssl-certgroup. In this example, we will add user
linuxconfigto the group, since we plan on letting that user log in via remote desktop:
$ sudo usermod -a -G ssl-cert linuxconfig
- Now we are ready to connect to the Raspberry Pi from another device. In our case, we will use a Windows 11 machine. Open your Remote Desktop client and type in the IP address or hostname of the Raspberry Pi, then click connect:
- Once connected, we will be prompted to log in with our account credentials:
- Finally, we are connected to the Raspberry Pi via xrdp and can control the system as if we were physically in front of it:
In this tutorial, we saw how to enable xrdp on a Raspberry Pi system. Remote Desktop Protocol is a popular and reliable method of controlling a PC remotely, which has been around for a long time. In many environments, especially if you have a Windows PC, it is easier to stick with RDP and the open source implementation of xrdp rather than migrate over to a new protocol like VNC for remote desktop sharing.