I ran:

sudo apt-get update
sudo apt-get install xrdp

I wen't to Windows 10 remote desktop connection and connected to my Raspberry Pi 3:

enter image description here

Then I entered default credentials credentials (pi/raspberry) and I got this log:

enter image description here

The login was successful but "Problem Connecting"... not very informative I'd say. Anyone knows what to do with it?

  • Any chances of checking the logfile to get a more informative message? – Dmitry Grigoryev Oct 17 '16 at 12:36
  • 2
    Doing just sudo apt-get install vnc4server, followed by either a reboot or a sudo service xrdp restart fixed it for me, but the mouse is an x instead of a mouse pointer like it should be. I'm doing some more experimenting now. PS. This is on my new Pi 3 with Raspbian Jessie installed from the latest v2 NOOBS installer. I never had any issues with xrdp on my Pi 1 B+. – Gabriel Staples Oct 17 '16 at 18:27
  • @Andrei, can you edit your post and specify "Pi 3" please in your title here? I see you've got it in your tags, but putting it in the title too I think is important because this problem definitely doesn't exist on the Pi 1. It has to do with the fact that the Pi 3 now comes pre-packaged with RealVNC, which conflicts with both xrdp (which uses vnc4server) and tightvncserver. – Gabriel Staples Oct 18 '16 at 13:25
  • @GabrielStaples sure, done! – Andrei Oct 18 '16 at 19:35
  • @GabrielStaples it probably has less to do with Pi 3 and more to do with the version of Raspbian. – Leif Gruenwoldt Mar 29 '17 at 14:03
up vote 55 down vote accepted

One of my friends had the very same error which he resolved by following the steps on this page.

Apparently there is a/are defect(s) which prevent xrdp working with the vncserver. However it works with tightvncserver

Also the order of installation of tightvncserver and xrdp seems to be important.

In summary

  • remove the following packages : xrdp, vnc4server, tightvncserver

sudo apt-get remove xrdp vnc4server tightvncserver

  • install tightvncserver followed by xrdp

sudo apt-get install tightvncserver

sudo apt-get install xrdp

  • 1
    I think it should be sudo apt-get remove xrdp vnc4server tightvncserver, not sudo apt-get remove xrdp vnc4server tightvnc. – Gabriel Staples Oct 17 '16 at 18:39
  • @GabrielStaples you're right. typo on my side. corrected – Shreyas Murali Oct 17 '16 at 18:52
  • 2
    Just a simple sudo apt-get install tightvncserver worked for me. I haven't installed it on the first place. – Andrei Oct 17 '16 at 21:16
  • 8
    @ShreyasMurali, so, although your answer does seem to work, it's not yet the full story. The problem seems to be that the Raspberry Pi 3 comes pre-installed with commercial-grade VNC software called "RealVNC" (realvnc.com/docs/raspberry-pi.html). If I ignore your answer and just do sudo apt-get install vnc4server, followed by either a reboot or a sudo service xrdp restart, my xrdp now works. OR, if I do your remove command above, and then xrdp and tightvncserver installs, the order doesn't matter. Whether I install xrdp first or not doesn't matter. – Gabriel Staples Oct 18 '16 at 12:44
  • 1
    What matters, however, is that the pre-installed RealVNC is now totally non-functional. Go to start menu --> Preferences --> Raspberry Pi Configuration --> click the "Interfaces" tab --> you'll see a line for "VNC" (this is the RealVNC), and now it is totally greyed out and disabled and I don't even have the option to enable it anymore. That's the real fix. Somehow, our commands have disabled the pre-installed RealVNC, and that's what fixed our xrdp problem now. – Gabriel Staples Oct 18 '16 at 12:46

Ok so I've done some more digging and several more hours of experimenting, and here's a more thorough answer, including info on how to get xrdp remote sessions to have the nice mouse cursor again instead of the big "X".

Background info:

It appears to me that Raspberry Pi 3 is the first Pi to come pre-installed with RealVNC, and RealVNC interferes with xrdp, so we must break the RealVNC install in order to get xrdp to work. You can see that RealVNC is installed by going to Start --> Preferences --> Raspberry Pi Configuration. You will see the following:

enter image description here

If you enable the VNC option and click "ok," you will see the VNCServer icon pop up in the bottom-right-hand corner of the screen. Its icon starts with a green capital "V". Click on the icon if you want to see the server window pop up, like this:

enter image description here

Anyway, close it and go back to the Raspberry Pi Configuration and disable it if you enabled it.

It appears to me that RealVNC must use some custom-modified versions of both vnc4server and tightvncserver, so modifying either one of these will break the RealVNC install, which is what we are going to do.

The fix:

Let's assume you already did sudo apt-get update and sudo apt-get install xrdp.

Now, let's break the RealVNC install. I have tested it and any of the following 3 options by themselves will work to break the RealVNC install and allow xrdp to work:

  1. sudo apt-get install vnc4server
  2. OR sudo apt-get install tightvncserver
  3. OR sudo apt-get remove xrdp vnc4server tightvncserver followed by sudo apt-get install tightvncserver and sudo apt-get install xrdp

You get the idea. I don't really think the order above or which option you choose matters.

Now, when you go to Start --> Preferences --> Raspberry Pi Configuration you will see that RealVNC is broken because the VNC option will now be greyed out as follows:

enter image description here

Done! Remote logins using xrdp now work.

But...you'll notice that the mouse cursor in your remote session into the Pi 3 has an X instead of a normal cursor. That's annoying, so let's fix that.

Following uschanka's answer here, do the following:

  1. Create the file ".xsessionrc" in the home directory ("/home/pi"). Note the dot at the beginning of the file name:
    • cd ~ then nano .xsessionrc
  2. Put the following content into this file: xsetroot -cursor_name left_ptr&
  3. Press ctrl + x and answer "y" to save and exit
  4. make the file executable: chmod +x .xsessionrc

Now when you remote into the Pi you'll get the nice cursor you know and love!

Lastly, if you ever decide you'd like to re-install RealVNC, follow their instructions here: https://www.realvnc.com/docs/raspberry-pi.html#raspberry-pi-legacy.

  • Looks like a good answer but: "It appears to me that Raspberry Pi 3 is the first Pi to come pre-installed with RealVNC" -> Raspbian is not model specific, it is the same on all models. However, new versions of it may come with RealVNC installed (I think I also read this on the Foundation blog recently). – goldilocks Nov 7 '16 at 16:00
  • FYI...I had to restart my Pi before the mouse cursor fix worked. – aphoria Feb 16 '17 at 17:16
  • What is the point of the & after left_ptr? Is that actually needed? – Pokechu22 Feb 16 '17 at 23:10
  • @goldilocks Ya this is an OS version (Raspbian Wheezy vs Raspbian Jessie) thing, not a Pi hardware thing. – Leif Gruenwoldt Mar 29 '17 at 14:16
  • 1
    @Pokechu22, left_ptr specifies the icon I believe (ie: the icon with the mouse pointer pointing slightly to the left), and the & is a Linux symbol used to say, "run this process in the background then continue" so that it continues running in the background while continuing on to more commands, rather than blocking at that point. Try it in the terminal for other commands which normally block, like opening up a GUI program from the terminal, with and without the & right after your command, and you'll see. – Gabriel Staples May 26 at 22:03

I didn't use the VNC server.

Let's check these things before I explain.

  1. In the raspi-config is the hostname set for the network?

  2. For XRDP working with Remote Desktop Connection, for the username you want to put in the Pi's LOCAL ip address. (Eg: 192.168.1.24)

To find out the local IP address you can do (in terminal) ipconfig or ifconfig (I don't remember). It should look like that example up address above.

I also use XRDP with Remote Desktop connection, and I can right click the device on my Windows PC and I can Remote Desktop to it without putting in the IP. I still recommend putting the IP address in the Computer box.

Hope this helps, Dallin

protected by Community Dec 25 '16 at 13:32

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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