How To Install and Connect RDP (xrdp) In Raspberry Pi?

Remote Desktop Protocol or RDP is a remote connection protocol which is created by Microsoft for their Windows operating systems. But with its advantages like low bandwidth connection, resource sharing it gained a lot of popularity. Raspberry Pi is a groundbreaking SoC that provides a cheap complete system. The RDP protocol can be used with the RaspberryPi in order to connect the RaspberryPi desktop environment with GUI.

Install RDP Server On RaspberryPi

RDP has server and client architecture where the RDP server should be installed on the RaspberryPi. Even we call it RaspberryPi it is a Linux distribution like Raspbian, Ubuntu etc. So we will follow the apt or apt-get based package installation. First we will update repostory and package information .

$ sudo  apt update

An we will update ot upgrade to the lastest package versions like below.

$ sudo  apt dist-upgrade

Now eveything is uptodate and we can install the RDP server package which is named xrdp. As its name suggests it is an RDP protocol implementation for the X Server and named as XRDP. Xrdp is open source implementation of the RDP server protocol and compatible with all RDP clients like Windows RDP client.

$ sudo apt install xrdp

But we can also show detailed package information about the xrdp with the apt show command like below.

$ apt show xrdp

The following output will be displayed which provides information like version, installed size, description, home page.

Package: xrdp
Version: 0.9.12-1.1
Priority: optional
Section: universe/net
Origin: Ubuntu
Maintainer: Ubuntu Developers [email protected]
Original-Maintainer: Debian Remote Maintainers [email protected]
Installed-Size: 3.026 kB
Pre-Depends: init-system-helpers (>= 1.54~)
Depends: adduser, lsb-base (>= 3.0-6), ssl-cert, libc6 (>= 2.15), libfuse2 (>= 2.6), libjpeg8 (>= 8c), libopus0 (>= 1.1), libpam0g (>=, libssl1.1 (>= 1.1.0), libx11-6, libxfixes3, libxrandr2
Recommends: fuse, xorgxrdp
Suggests: guacamole, xrdp-pulseaudio-installer
Download-Size: 435 kB
APT-Sources: groovy/universe amd64 Packages
Description: Remote Desktop Protocol (RDP) server
xrdp offers a graphical login to a remote client using
RDP (the Remote Desktop Protocol). xrdp can connect to
a locally created session with the xorgxrdp drivers,
to a VNC X11 server, and forward to another RDP server.
xrdp accepts connections from freerdp, rdesktop, and the
built-in terminal server / remote desktop clients of
Microsoft Windows operating systems.
In the xorgxrdp (which replaces X11RDP) and VNC modes,
it provides a fully functional Linux terminal server,
offering an X-Window desktop to the user. In the RDP
or VNC forwarding mode, any sort of desktop can be used.

The RDP connection is established by using the IP address or domain name. But the IP address is the most popuar way becuase not every system provides domain name which can be resolved by the DNS servers. The RDP server IP address will be displayed with the following commands.

$ hostname -I

Also the ip address command can be used to print IP address of the RaspberryPi

$ ip address
RaspberryPi IP Address

Connect Raspberry Pi From Windows with RDP

As a built-in protocol Windows operating systems like Windows XP, Windows Vista, Windows 7, Windows 8, Windows 10, and all Windows Server versions provide the RDP client by default. So there is no need to install the RDP client for the Windows operating systems.

The Windows RDP client can be opened via the Start menu by typing the remote desktop connection like below.

Open RDP (Remote Desktop Connection) Client

The following screen we will provide the IP address of the Raspberry Pi but if the DNS server can resolve the domain name the domain name of the Raspberry Pi can be also used.

Connect RDP Server

As RDP is a secure and encrypted protocol it will try to identify the Raspberry Pi identity with some certificates. Just click on the “Yes” to accept it.

Accept RDP Server Identity

When the RDP connection is established the xrdp welcome screen will greet us. This screen provides a login screen that asks us the Session, username, and password. Leave the session as default which will be “Xorg” and put the username and password. If you are using the default Raspberry Pi user and password use the “pi” as username and “raspberry” as password. Also for more information about default users and passwords for RaspberryPi operating systems take a look at the following tutorial.

XRDP Login

RDP Alternatives

Even the RDP is a great protocol to connect RaspberryPi system remotely with a GUI there are alternatives which can be used for different cases.

VNC is a popular protocol for Linux distributions which provides remote connection with GUI.

TeamViewer is a propriateary protocol and tool which can be installed into the RaspberryPi and another TeamViewer user can connect to it easily even there is no need for network, firewall or port configuration.

Leave a Comment