Ubuntu 20.04: Connect to Cinnamon desktop environment via XRDP

This article will describe installing Cinnamon desktop environment and XRDP, and connecting to Cinnamon desktop environment via XRDP.

1 Install Cinnamon desktop environment

Install Cinnamon desktop environment with this.

2 Install XRDP

#!/bin/sh -e

sudo apt install -y xrdp
sudo sed -e 's/^new_cursors=true/new_cursors=false/g' \
     -i /etc/xrdp/xrdp.ini
sudo systemctl enable xrdp
sudo systemctl restart xrdp

echo "cinnamon-session" > ~/.xsession
D=/usr/share/gnome:/usr/share/cinnamon:/usr/local/share:/usr/share
D=${D}:/var/lib/snapd/desktop
C=/etc/xdg/xdg-cinnamon:/etc/xdg
cat <<EOF > ~/.xsessionrc
export XDG_SESSION_DESKTOP=cinnamon
export XDG_DATA_DIRS=${D}
export XDG_CONFIG_DIRS=${C}
EOF

3 Connect to Cinnamon desktop environment via XRDP

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

0001_xrdp-cinnamon.png