48

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?

Andrei
  • 635
  • 1
  • 10
  • 11

3 Answers3

58

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

Shreyas Murali
  • 2,446
  • 1
  • 16
  • 23
19

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.

Gabriel Staples
  • 343
  • 3
  • 11
1

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

Dallin75
  • 71
  • 1
  • 1
  • 9