Configuring xrdp on Ubuntu 20.04

The Issues and Solutions

I was getting no and then garbled output when trying to connect to xrdp on Ubuntu.

To fix the no output and garbled lines you need to edit a file named /etc/X11/Xwrapper.config and add the following:

allowed_users =anybody
needs_root_rights=no

Then my /etc/xrdp/startwm.sh file looks like:

#!/bin/sh
# xrdp X session start script (c) 2015, 2017 mirabilos
# published under The MirOS Licence

unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR

if [ -r /etc/default/locale ]; then
  . /etc/default/locale
  export LANG LANGUAGE
fi

gnome-session
exit 0

The Remaining Issue

However after setting needsroot_rights=no in **_Xwrapper.config** I can no longer login from the actual PI Gnome login. This had to be removed and the Pi restarted to get logins working again.

XFCE4 To th Rescue

Run:

sudo apt-get install -y xfce4

Edit /etc/xrdpstartwm.sh:

#!/bin/sh
# xrdp X session start script (c) 2015, 2017 mirabilos
# published under The MirOS Licence

unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR

if [ -r /etc/default/locale ]; then
  . /etc/default/locale
  export LANG LANGUAGE
fi

# xfce
exec startxfce4