Remote Desktop Protocol or RDP is a remote connection protocol that is created by Microsoft for their Windows operating systems. But with its advantages like low bandwidth connection, and 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 the repository and package information.
$ sudo apt update
And we will update to upgrade to the latest package versions like below.
$ sudo apt dist-upgrade
Now everything is up to date 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 is named XRDP. Xrdp is an open-source implementation of the RDP server protocol and is compatible with all RDP clients like the 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, and home page.
Package: xrdp Version: 0.9.12-1.1 Priority: optional Section: universe/net Origin: Ubuntu Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com Original-Maintainer: Debian Remote Maintainers debian-remote@lists.debian.org Bugs: https://bugs.launchpad.net/ubuntu/+filebug 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 (>= 0.99.7.1), libssl1.1 (>= 1.1.0), libx11-6, libxfixes3, libxrandr2 Recommends: fuse, xorgxrdp Suggests: guacamole, xrdp-pulseaudio-installer Homepage: http://www.xrdp.org/ Download-Size: 435 kB APT-Sources: http://tr.archive.ubuntu.com/ubuntu 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 X.org 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 popular way because not every system provides a domain name that can be resolved by the DNS servers. The RDP server IP address will be displayed with the following commands.
$ hostname -I
192.168.146.136
Also, the IP address command can be used to print the IP address of the 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.

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

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.

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.

Connect RaspberryPi From Linux (Ubuntu,Debian,CentOS)
Linux provides Remote Desktop Connection or RDP client named Remmina
. Remmina can connect remote RDP, VNC, and SSH servers easily with a lot of different configurations. We can use the remmina in order to connect remote RaspberryPi. First, we install remmina like below.
Debian, Ubuntu, Mint:
$ sudo apt install remmina
Fedora, CentOS, RHEL:
$ sudo dnf install remmina

RDP Alternatives
Even the RDP is a great protocol to connect the RaspberryPi system remotely with a GUI there are alternatives that can be used for different cases.
VNC is a popular protocol for Linux distributions that provides a remote connection with GUI.
TeamViewer is a proprietary protocol and tool which can be installed into the RaspberryPi and another TeamViewer user can connect to it easily even if there is no need for a network, firewall, or port configuration.