(The username in this example is desktop
.)
sudo addgroup --gid 2000 desktop
sudo adduser \
--gid 2000 \
--uid 2000 \
--gecos "" \
--disabled-login \
desktop
sudo usermod -a -G sudo desktop
echo "desktop ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/desktop
Set a password for the desktop
user:
sudo passwd desktop
sudo apt update
sudo apt upgrade
sudo apt install --yes xubuntu-desktop
echo xfce4-session | sudo tee /home/desktop/.xsession
cat <<EOF | sudo tee /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla
[Allow Colord all Users]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
ResultAny=no
ResultInactive=no
ResultActive=yes
EOF
sudo apt install --yes xrdp
sudo systemctl start xrdp
sudo systemctl enable xrdp
Now it should be possible to connect to the instance IP via RDP using the desktop
username and password.