Install XRDP on Debian 10
apt install xrdp
apt install xserver-xorg-core
apt install xorgxrdp
adduser xrdp ssl-cert
Update configuration file
vi /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.color-manager.create-device" || action.id == "org.freedesktop.color-manager.create-profile" || action.id == "org.freedesktop.color-manager.delete-device" || action.id == "org.freedesktop.color-manager.delete-profile" || action.id == "org.freedesktop.color-manager.modify-device" || action.id == "org.freedesktop.color-manager.modify-profile") && subject.isInGroup("{group}"))
{
return polkit.Result.YES;
}
});
Update firewall
ufw allow from 192.168.1.0/24 to any port 3389
Set Services to start at boot
systemctl enable xrdp
systemctl restart xrdp
Disable suspend and hibernation
In some cases if you are running this remotely on a vps you may not want to have the machine go to sleep so you can disable this with.
systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
or you can create a systemd config file /etc/systemd/sleep.conf.d/nosuspend.conf
[Sleep]
AllowSuspend=no
AllowHibernation=no
AllowSuspendThenHibernate=no
AllowHybridSleep=no