Setting up XRDP (remote desktop server) on Pop OS
I am creating this post in order to document how I setup remote desktop on Pop OS.
The first step is to install xrdp
<span style="color:#323232;">sudo apt update
</span><span style="color:#323232;">sudo apt install xrdp -y
</span>
From there you need to create the security groups
<span style="color:#323232;">sudo groupadd tsusers
</span><span style="color:#323232;">sudo groupadd tsadmins
</span><span style="color:#323232;">sudo usermod -aG tsusers $USER
</span><span style="color:#323232;">sudo usermod -aG tsadmins $USER
</span>
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.
<span style="color:#323232;">sudo adduser xrdp ssl-cert
</span>
Next you need to setup polkit rules.
<span style="color:#323232;">sudo bash -c "cat >/etc/polkit-1/localauthority/50-local.d/45-allow.colord.pkla" <<EOF
</span><span style="color:#323232;">[Allow Colord all Users]
</span><span style="color:#323232;">Identity=unix-user:*
</span><span style="color:#323232;">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
</span><span style="color:#323232;">ResultAny=no
</span><span style="color:#323232;">ResultInactive=no
</span><span style="color:#323232;">ResultActive=yes
</span><span style="color:#323232;">EOF
</span>
<span style="color:#323232;">sudo bash -c "cat >/etc/polkit-1/localauthority/50-local.d/46-allow-update-repo.pkla" <<EOF
</span><span style="color:#323232;">[Allow Package Management all Users]
</span><span style="color:#323232;">Identity=unix-user:*
</span><span style="color:#323232;">Action=org.freedesktop.packagekit.system-sources-refresh;org.freedesktop.packagekit.system-network-proxy-configure
</span><span style="color:#323232;">ResultAny=yes
</span><span style="color:#323232;">ResultInactive=yes
</span><span style="color:#323232;">ResultActive=yes
</span><span style="color:#323232;">EOF
</span>
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:
<span style="color:#323232;">export GNOME_SHELL_SESSION_MODE=pop
</span><span style="color:#323232;">export GDMSESSION=pop
</span><span style="color:#323232;">export XDG_CURRENT_DESKTOP=pop:GNOME
</span>
From there you can start xrdp.
<span style="color:#323232;">sudo systemmctl start xrdp
</span>
enjoy!
Sources:
forum.level1techs.com/t/xrdp-on-popos-fix/163985