I've read many and many threads about Raspberry and xrdp but each time it seems people had a screen display connected to their raspeberry.

It is not my case : I've installed Raspian to the mirco SD card, then add 2 files to enable SSH and configure the WiFi. Then I connect through SSH.

I've installed xdrp, vnc4server, tightvncserver And I always get the following message :

connecting to sesman ip port 3350
sesman connect ok
sending login info to session manager, please wait ...
login failed for display 0

Is xrdp only available if a display is connected to the raspeberry ?

8 Answers 8


All of these programs mirror a display.

This can be the screen or a virtual screen.

https://raspberrypi.stackexchange.com/a/93372/8697 shows hot to create a virtual screen.

See also the Foundation tutorial

The Pi does not need to have a physical screen - if you boot to the GUI and set a default resolution it can be used without.

You can specify size on the command line, or by setting the default resolution in raspi-config.

I have not tried xrpd.

  • Hi, I've set boot on GUI but how can I set resolution and create virtual display ?
    – Bm28
    Jul 27, 2019 at 20:43

This worked for me: You can add to


the line

allowed_users = anybody

  • How does this answer the question: "Is xrdp only available if a display is connected to the raspeberry ?"
    – Ingo
    Jun 20, 2020 at 19:12

I had the same problem, turns out just out of pure boredom tried another way to enable the ssh port on the machine found out I had not opened the port properly.

On ubuntu, it all worked once I allowed sudo ufw allow /tcp. Until I added the tcp part it would not work. I even reinstalled the image multiple times to no avail.

I also learnt the hard way that if you are already signed in with that user, you cannot xrdp with the same user at least.

  • @fkey with firewalls its best to be port / service specific so for example sudo ufw allow ssh OR even better sudo ufw allow from xxx.xxx.xxx.xxx/24 to any port 22 OR best of all restrict to one remote machine and use ssh keys. Limit access to bare minimum only.
    – user115418
    Dec 27, 2020 at 11:22
  • Yes, I agree. However, in my case it was just a matter of testing a system nothing production related yet.
    – fkay
    Jan 2, 2021 at 9:37

I managed to get it working when I simply RDP-ed (from Macbook Pro M1 With Microsoft RDP) with another user account.

At first I followed the instructions on this page: https://linuxize.com/post/how-to-install-xrdp-on-raspberry-pi/ I proceeded to add user "xrdp" to the user list.

When I RDP-ed using this xrdp user I got the error message failed to logon to display 0. It worked when I RDP-ed using the original user "pi". As a precaution I made sure I was logged out of the Raspberry PI session first.


I stumbled on this thread because of the error message and as a lot of people seem to get it as well, so here is my solution (although it is not exactly what the question was about).

The reason why I got the error was simply that my password was wrong. When I set up my raspberry I changed the password by using "sudo passwd", but this did not change the password of the user pi! Just do "sudo passwd pi" to change to password of the user and then it will work.


This occurred to me as I changed the default password not from the RPI configuration but from the RPI imager. I think it did not set the new password properly.

(in short due to wrong password you get above message) It is explained here. https://superuser.com/questions/1143359/xrdp-session-login-failed-for-display-0


For several days, I was trying to resolve this same xrdp issue from Win11 to RPI4B running on Raspberry PI OS (64-BIT), Debian Bullseye. Then it became evident that I need to have an additional userid for the xrdp connection.

I did test these steps on two RPI4 systems with fresh installation and now it works.

sudo apt update
sudo apt upgrade

sudo apt install xrdp
sudo adduser xrdp ssl-cert

sudo adduser --home /home/<userid>/ <userid>
sudo addgroup tsusers
sudo addgroup tsadmins
sudo adduser <userid> tsusers

sudo service xrdp restart

I had the same problem ... I was trying to connect with another account. It only worked when I logged in using credentials User: pi Password: raspberry (if you not change the default password)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.