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:
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:
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:
sudo apt-get install vnc4server
- OR
sudo apt-get install tightvncserver
- 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:
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:
- Create the file ".xsessionrc" in the home directory ("/home/pi"). Note the dot at the beginning of the file name:
cd ~
then nano .xsessionrc
- Put the following content into this file:
xsetroot -cursor_name left_ptr&
- Press ctrl + x and answer "y" to save and exit
- 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.
sudo apt-get install vnc4server
, followed by either a reboot or asudo 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+.