Installing XRDP Viewer for Raspberry Pi



XRDP Installation Guide: Remote Access to a Raspberry Pi

The instructions described below were derived from here


Introduction to XRDP

XRDP is an open-source implementation of Microsoft's Remote Desktop Protocol (RDP), enabling remote desktop access to your Raspberry Pi. It allows you to control your Raspberry Pi's desktop environment from another computer, making it useful for remote management and troubleshooting.


Why Use XRDP?

  • Easy Access: Control your Raspberry Pi from any device with an RDP client.

  • Cross-Platform Compatibility: Works with Windows, macOS, and Linux.

  • Separate Session: Provides a different session from the Raspberry Pi's local screen, ensuring no interference.


Installation Steps for Raspberry Pi

1. Install XRDP Server

1) Open a Terminal or connect via SSH to your Raspberry Pi: Open a terminal window on your Raspberry Pi or connect via SSH

2) Update APT Package List: Run the following command to update the package list:

    sudo apt update

3) Install XRDP: Install the XRDP package by running:

    sudo apt install xrdp

4) Manage XRDP Service: XRDP starts automatically on boot, but you can manage the service using:

    sudo service xrdp start

    sudo service xrdp stop

    sudo service xrdp status

    sudo service xrdp restart

2. Get the Raspberry Pi IP Address

You need the Raspberry Pi's IP address to connect remotely. Use one of these three methods to obtain the Raspberry Pi's IP:

1) Check Network Icon: Hover over the network icon in the top-right corner of the desktop environment to see the IP address.

2) Command Line: Alternatively, use the following command:

    ip a

    Look for the IP address in the output.

3) Command Line: This command will display only the IP address:

    hostname -I

3. Create a New User Account

Since Raspberry Pi OS Bullseye, the default user account cannot be used for RDP. Create a new account:

1) Create User: Run the following command to create a new user:

    sudo adduser <newusername>

    Follow the prompt to set up the new user.

2) Assign Permissions: If needed, assign sudo permissions to the new user:

    sudo usermod -aG sudo <newusername>


Connecting from Your Computer

Windows

1) Open Remote Desktop Connection: Search for "Remote Desktop Connection" in the Start menu.

2) Enter IP Address:: Enter the Raspberry Pi's IP address.

3) Login: Use the new user account credentials to log in.

macOS

1) Download Microsoft Remote Desktop: Install Microsoft Remote Desktop from the App Store.

2) Add a New Connection: Open the app, add a new connection, and enter the Raspberry Pi's IP address.

3) Login: Use the new user account credentials to log in.

Linux

1) Install Remmina: Install Remmina, an RDP client, using your package manager:

    sudo apt install remmina

2) Add a New Connection: Open Remmina, add a new RDP connection, and enter the Raspberry Pi's IP address.

3) Login: Use the new user account credentials to log in.


You have now successfully installed and configured XRDP on your Raspberry Pi. You can now remotely access and control your Raspberry Pi's desktop environment from another computer.