Getting xrdp up and running on Ubuntu 18 LTS

If you upgrade from 16.04 LTS to 18 LTS, you might find your XRDP installation fails to start. My advice is to remove the XRDP package and purge the configuration files after backing them up.

I set up XRDP so infrequently, I’ve noted down some notes for reference below.

This uses XFCE4 to reduce overhead of the RDP connection. Remote desktop connections require a wired connection with low latency and little or no contention.

Update the system

Update the system using the following command:

# apt-get update

Install xfce4

Install xfce4 using the following command:

# apt-get install xfce4

Install XRDP

Install xrdp as follows:

# apt-get install xrdp

Update xsession

As the intended user, update xsession

$ echo "xfce4-session" > ~/.xsession

Edit the startwm.sh file

Edit the file as follows. Note I use a different technique here to most guides.

pico -$ /etc/xrdp/startwm.sh

Update the file at the end, as follows:

if test -r /etc/profile; then
        . /etc/profile
fi
# Uncommenting
#test -x /etc/X11/Xsession && exec /etc/X11/Xsession
#exec /bin/sh /etc/X11/Xsession
# Addition below
startxfce4

Performance tweaks

In the globals section add/update:

[Globals]
crypt_level=none
allow_multimon=false
bulk_compression=true
max_bpp=16
ls_title=Linux Server Login
ls_bg_color=4f4f4f
[Channels]
rdpdr=false
rdpsnd=false
drdynvc=false
cliprdr=false
rail=false
xrdpvr=true
tcutils=true

Restart the service

# service xrdp restart

Login

Now try a login using Remote Desktop Connection. Disable sound, clipboard and printer sharing to reduce requirements.

Security note

You should not use XRDP as a public-facing RDP service. The above configuration disables encryption so your traffic could be observed if intercepted.