Ubuntu 18.04: Connect to GNOME desktop environment via XRDP

Table of Contents

1 Install XRDP

Install xrdp package. If using Xorg as session type, TigerVNC is not needed.

$ sudo apt install -y xrdp

Disable newcursors because black background around cursor is displayed if using Xorg as session type.

$ sudo sed -e ‘s/^new_cursors=true/new_cursors=false/g’ -i /etc/xrdp/xrdp.ini$ sudo systemctl restart xrdp

2 Create ~/.xsessionrc

create ~/.xsessionrc which will export the environment variable for customized settings for Ubuntu.

$ D=/usr/share/ubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop$ cat <<EOF > ~/.xsessionrcexport GNOME_SHELL_SESSION_MODE=ubuntuexport XDG_CURRENT_DESKTOP=ubuntu:GNOMEexport XDG_DATA_DIRS=${D}export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdgEOF

3 Authentication Required dialog

If using Xorg as session type, Authentication Required dialog will be displayed after creating session.


If you success this authentication twice, colord and gsd-color will causes error and XRDP connection will be lost. So add rule which makes this authentication to be failed.

$ cat <<EOF | sudo tee /etc/polkit-1/localauthority/50-local.d/xrdp-color-manager.pkla[Netowrkmanager]Identity=unix-user:*Action=org.freedesktop.color-manager.create-deviceResultAny=noResultInactive=noResultActive=yesEOF$ sudo systemctl restart polkit

4 Connect to GNOME desktop environment via XRDP

Use Xorg as a session type. Windows Remote Desktop Connection is as the following.


4.1 rdesktop client with clipboard makes nautilus hang

There is no problem when using Windows Remote Desktop Connection or Remmina.

But rdesktop has a problem. If using rdesktop with enabling clipboard, nautilus on XRDP server will be hang (CPU usage will be high).

So if using rdesktop, please disable clipboard with “-r clipboard:off”.

$ rdesktop -r clipboard:off XRDPSERVER

Android | Linux | SDL - Narrow Escape