I want to connect to my Ubuntu 22.04 computer with a remote desktop app just like how I connect to my Windows PC. Now XRDP promises to do that, and it is easy to install. However, configuring it so that it works properly is kind of complicated -- I get display errors and login errors. There is a nice page explaining how to configure XRDP for the Xfe window manager here, but Xfe is not nearly as nice as the standard Gnome window manager for Ubuntu. For example, I cannot cut from local computer and paste into my remote Xfe window.
So, how to install and configure XRDP with Gnome on my Ubuntu computer?
Here's my XRDP remote desktop with Xfe:
Not bad, but no cutting and pasting into it, and the terminal is not as nice as Gnome, and I can't find a good Settings window, etc.
There are bits and pieces of how to do this around the web, with some incorrect. Here is what I found that works well for configuring XRDP with Gnome without having to modify global /etc files. When properly configured, it runs reasonably fast, although is not as zippy as Xfe.
sudo apt update
sudo apt install xrdp gnome-session
sudo adduser xrdp ssl-cert
echo "gnome-session" | tee ~/.xsession
~/.xsessionrc file using:echo "export XAUTHORITY=${HOME}/.Xauthority" | tee ~/.xsessionrc
echo "export GNOME_SHELL_SESSION_MODE=ubuntu" | tee -a ~/.xsessionrc
echo "export XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg" | tee -a ~/.xsessionrc
Here the XAUTHORITY line solves the Display error when opening Firefox and other apps that rely on root privileges.
Optionally, if you want the regular Gnome desktop with vertical menu on the side rather than Activities menu, do this:
echo "export XDG_CURRENT_DESKTOP=ubuntu:GNOME" | tee -a ~/.xsessionrc
sudo systemctl restart xrdp
Note that things are not quite as seamless as Windows remote desktop. In particular:
Here's my XRDP remote desktop with Gnome:

Now I can cut from my local computer and paste into my remote computer. And the menus are almost the same as being logged in locally. Yay!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With