Xrdp creates a strange directory called thinclient_drives

In Ubuntu 18.04, Bionic Beaver, if you are using xrdp for remote access, you may notice a directory called "thinclient_drives" appearing in your home directory. In the permissions it may show a bunch of question marks, which looks scary.

There seems to be a bug in xrdp code which attempts to share drives, clipboard and other things. It is creating this directory and not mounting it correctly. Here is how to get rid of it.

Edit /etc/xrdp/xrdp.ini. Update the allow_channels setting to say allow_channels=false.

After saving the change, remove the spurious thinclient_drives directory. If the system will not allow you to remove it, first unmount it with
sudo umount $HOME/thinclient_drives

You will not be able to use shared drives, clipboard, and so on, but those do not seem to be working anyway.

Xrdp shows a blank screen with Ubuntu 18.04, Bionic Beaver

If you are trying to use remote desktop on Ubuntu or Xubuntu 18.04 you may find that after logging in all you see is a blank screen.

One cause of this is that xfce4 has added code that prevents a second session from opening. You will find that if your computer's main screen is logged into xfce4 you may not be able to use it with xrdp.

To solve this "second session" problem and allow as many sessions as you need, edit /etc/xrdp/startwm.sh and add these lines before the lines that test and execute Xsession. The $HOME/.profile is not part of the solution, but is something that should be run before starting the session anyway.

unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR
. $HOME/.profile