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/
I’m using xrdp for years on MX (Debian) and never had to modify something after install, just
sudo apt install xorgxrdp
sudo apt install xrdp
and that’s it
That’s not secure and for pop os you need additional configuration
I’m using it locally to access various PC so no problem
Then do VNC over Tailscale, or X2Go over SSH… seriously, anything would be faster than those instructions. Why is it so complicated?!
Because I’m making it fill the role what historically was a Windows terminal server
If you’re using X, then all you need is SSH. What’s the advantage of using another protocol layer?
With X2go you can also forward sound and share printers and dirs.
A-ha. Neat!