This guide shows how to set up a Remote Desktop Connection with a Raspberry Pi using RDP on Mac OS. The Remote Desktop Protocol (RDP) is the proprietary network protocol developed by Microsoft to connect to a remote desktop computer and access its graphical user interface. This allows you to connect your Mac computer to your Raspberry Pi and control its GUI remotely.
We have a similar guide for Windows PC: Raspberry Pi: Set Up Remote Desktop Connection (RDP)
Prerequisites
Before proceeding, make sure you check the following prerequisites.
- You need a Raspberry Pi board.
- Operating System: you should have a Raspberry Pi running Raspberry Pi OS (32-bit or 64-bit). The OS should have Desktop support (doesn’t work on Lite OS).
- SSH: You should be able to establish an SSH connection with your Raspberry Pi.
xrdp (open-source Remote Desktop Protocol Server)
xrdp provides a graphical login to remote machines using RDP (Microsoft’s proprietary Remote Desktop Protocol). xrdp accepts connections from a variety of RDP clients. We’ll be using Microsoft Remote Desktop Client for Mac OS (but it’s also compatible with Windows, iOS, and Android).
xrdp allows you to connect to your Raspberry Pi to control its desktop remotely.
Please note that your Raspberry Pi must be running a full Raspberry Pi OS – it will not work with a headless or Lite OS.
Installing xrdp on Raspberry Pi (Remote Desktop Protocol)
Having an SSH connection established with your Raspberry Pi, update and upgrade your Raspberry Pi, if any updates are available. Run the following command:
sudo apt update && sudo apt upgrade -y
Next, we need to install the xrdp software on your Raspberry Pi:
sudo apt install -y xrdp
That’s it. You don’t need to change any configurations, everything will work out of the box with the default settings.
Finally, run the following command to get the Raspberry Pi IP address. You’ll need the IP address to establish the remote connection.
hostname -I
Microsoft Remote Desktop Connection Software – Mac OS
The Microsoft Remote Desktop software can be installed in the App Store. Open the App Store.
Search for “Microsoft Remote Desktop” on the App Store and click the “Get” button:
After the software is installed, click “Open“.
Next press the “Add PC” button to set the Raspberry Pi settings.
Type the Raspberry Pi IP address in the computer field and press the Add button:
The Raspberry Pi PC will be added to your Microsoft Remote Desktop software, then click the “Connect” option.
Click the “Connect” button to establish the connection.
Next, type your Raspberry Pi username and password and click the “Continue” button to login into your device.
You might be prompted one more time for the authentication if you just powered your Raspberry Pi, so enter again your username and password.
That’s it! You can now control your Raspberry Pi desktop computer remotely from Mac OS.
Wrapping Up
In this tutorial, you learned a very convenient, practical, and easy way to establish a remote connection with your Raspberry Pi using xrdp. This is our favorite method to access the Raspberry Pi desktop because you don’t have to connect an additional screen, keyboard, and mouse. You can also use RDP on a Windows PC.
We hope you found this tutorial useful. You can check all our Raspberry Pi projects on the following link:
Thanks for reading.
Same here, running raspi4 with 64 bit bookworm and the rdp login process from windows 10 fails immediatly after the authentification screen. The overlay in /boot/firmware/config.txt (the /boot/config.txt exist but a notice says to use the one in 3boot/firware instead) was already uncommented. Tried the the fkms variant to no avail. I will keep you posted if i find a solution.
Hi.
Can’t get this working. I have a rpizero with 32 bit os with desktop. SSH works but remote desktop gives error. Trying from a mac mini with monterey.:
connecting to sesame on 127.0.0.1.3350
sesame connect ok
sending login info to session manager.Please wait…
login successful for user xxx on display 10
started connecting
connection problem, giving up
some problem
Error connecting to user session
Any suggestions ?
Thanks
SOLUTION
#TLDR: create a new user, and use that id to RDP into the RPi instead of the root user (e.g., pi@raspberrypi)
I ran into the same issue …. I can ssh into the RPi from my MacBook Pro, but cannot RDP into it. Long story short I learnedthat RDP requires a different username than the one you’re using on the RPI. If your RPi’s root user is ‘pi’ then for some reason (probably security) you cannot also rdp in as ‘pi’; you need to create another username using the adduser command on the RPi.
This isn’t my solution, I merely found it on the RaspberryPi forum, tried it, and it worked!
I’ve excerpted the solution text below, and the link below that. Some additional hints at the bottom…..Hope this help!
Re: Remote desktop connection not working, no desktop after login
Tue Oct 25, 2022 7:47 am
XRDP doesn’t work for root user ‘pi’, You need to create another user. The Pi root user cannot RDP for whatever reason.
sudo adduser <username>
.Choose password
Confirm password
Hit enter for defaults
Try RDP again with that login
I hope this helps the next person running into this!
forums.raspberrypi.com/viewtopic.php?t=339980
PS: You may find that you won’t have access to all the directories and files that the root account had. For example, opening the terminal, will show you a different user’s command prompt than what you normally see.
After RDP-ing into the RaspberryPI, open a terminal;
Suppose the rdp user account name is ‘new-rdp-user’; you should see the following prompt
and the pwd ( print working directory ) command will show the new user’s home directory
new-rdp-user@raspberrypi:~ $ pwd
/home/new-rdp-user
To change back over to the root user, ‘pi’ (if that was the original root user),
use the ‘su ‘ command to use that user’s login
new-rdp-user@raspberrypi:~ $ su pi
Password:
pi@raspberrypi:/home/new-rdp-user $
But here, you can see the directory did not change … it’s still in the new user’s home # directory so just type ‘cd’ followed by [Enter] to go to pi’s home directory
pi@raspberrypi:/home/new-rdp-user $ pwd
/home/new-rdp-user
pi@raspberrypi:/home/new-rdp-user $ cd
pi@raspberrypi:~ $
pi@raspberrypi:~ $ pwd
/home/pi
Now you should see all of the pi’s directories and files
pi@raspberrypi:~ $ pwd
/home/pi
To get out of pi’s login context, just type the ‘exit’ command
and you’ll be back to new-rdp-user’s user prompt – hope this helps 🙂