<<<Rasberry Pi Guides>>>

Enable RDP

I prefer to run my Rasberry Pi in headless mode and so I need another method for connecting to my environment.

My method of choice used to be Virtual Network Computing or VNC, but these days I prefer to use Remote Desktop Protocol or RDP. This page takes you through the process of setting up RDP on your Rasberry Pi

Note: you will need a suitable RDP client to be able to connect to the Rasberry Pi once you have completed this configuration

First install Remote Desktop Server

pi@raspberrypi:~ $ sudo apt install xrdp -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  x11-apps z11-session-utils xbitmaps xfonts-75dpi xfonts-base xfonts-scalable
  xorg xorg-docs-core xorgxrdp
    

Now that the xrdp server is installed to the Raspberry Pi there is nothing else that you need to do. The xrdp server software is automatically installed with the best possible configuration and is ready to work straight out of the box. All that remains is to turn it on.

So enable RDP

The first step is to enable RDP to start automatically, this is done by enabling the service

pi@raspberrypi:~ $ sudo systemctl enable xrdp
Synchronizing state of xrdp.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable xrdp
    

Then you simply start the service

pi@raspberrypi:~ $ sudo systemctl start xrdp
    

And the state of the service can be checked with the following command

pi@raspberrypi:~ $ sudo systemctl status xrdp
● xrdp.service - xrdp daemon
   Loaded: Loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2021-02-14 11:11:36 GMT; 7min ago
     Docs: man:xrdp(8)
           man:xrdp.ini(5)
 Main PID: 1916 (xdp)
    Tasks: 1 (limit: 2062)
   CGroup: /system.slice/xrdp.service
       └─1916 /usr/sbin/xrdp

    

Now all that remains is to connect to your Rasberry Pi with the RDP client of your choice, and for that you just need