I am creating this post in order to document how I setup remote desktop on Pop OS.
The first step is to install xrdp
sudo apt update
sudo apt install xrdp -y
From there you need to create the security groups
sudo groupadd tsusers
sudo groupadd tsadmins
sudo usermod -aG tsusers $USER
sudo usermod -aG tsadmins $USER
The you need to edit /etc/xrdp/sesman.ini
to enforce groups. Change AlwaysGroupCheck to true and disable root login.
From there you need to give xrdp permission.
sudo adduser xrdp ssl-cert
Next you need to setup polkit rules.
sudo bash -c "cat >/etc/polkit-1/localauthority/50-local.d/45-allow.colord.pkla" <<EOF
[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 bash -c "cat >/etc/polkit-1/localauthority/50-local.d/46-allow-update-repo.pkla" <<EOF
[Allow Package Management all Users]
Identity=unix-user:*
Action=org.freedesktop.packagekit.system-sources-refresh;org.freedesktop.packagekit.system-network-proxy-configure
ResultAny=yes
ResultInactive=yes
ResultActive=yes
EOF
From there you need to setup the desktop. By default Gnome will start so you will need to set the pop desktop as default. To do this edit sudo nano /etc/xrdp/startwm.sh
and add the following:
export GNOME_SHELL_SESSION_MODE=pop
export GDMSESSION=pop
export XDG_CURRENT_DESKTOP=pop:GNOME
From there you can start xrdp.
sudo systemmctl start xrdp
enjoy!
Sources:
https://c-nergy.be/blog/?p=16637
https://forum.level1techs.com/t/xrdp-on-popos-fix/163985
https://linuxize.com/post/how-to-install-xrdp-on-ubuntu-20-04/
Calling it
tsusers
just feels wrongTerminal server users