Some of you might have noticed that running apps as root/sudo under XRDP doesn't work out of the box.
While it is best to avoid it if possible, sometimes it is necessary, for apps like GParted.
So how to fix it?
touch ~/.xsessionrc
echo "export XAUTHORITY=${HOME}/.Xauthority" > ~/.xsessionrc
Confirmed to be working on: