It maybe very surprising
That one want to install RDP instead of using VNC on a Linux system however I figrued that since Microsoft Remote Desktop client is readily available for Mac, Windows(Windows Store App or Remote Desktop Connection classic windows application built-in) as well as iOS and Android devices I would prefer this route.
Dated documentation lacking maintainence
Is always an issue with open source community, this time it is not an exception.
I carefully consulted Google and Bing GPT-4 chatbot however they were not able to find me any up-to-date documentaion that works. The closest I found is this article about setting up xrdp on Ubuntu 18.04.
Time to write my own guide
Turns out the document I found above is more than helpful, at least we know we need xrdp package installed as our first step, if it isn’t obvious until now.
Here are the steps worked for me:
- Install xrdp:
sudo apt-get -y install xrdp
. - When I checked the configuration file located at
/etc/xrdp/xrdp.ini
it seemed thecrypt_level
is already set tohigh
, there are no such parameter calledencrypt_level
, maybe it is renamed. - Run
sudo systemctl status xrdp
to check xrdp status, runsudo systemctl enable xrdp
,sudo systemctl start xrdp
orsudo systemctl restart xrdp
as needed. - Verify the
xrdp
andxrdp-sesm
processes are listening for connections, runsudo lsof -nP -iTCP -sTCP:LISTEN
to see all listening TCP ports. - You should now run the
sudo ufw status
to verify if the firewall of Ubuntu is enabled, in my case it was enabled by me earlier so I indeed need to runsudo ufw allow 3389/tcp
in order to allow incoming traffic on TCP port 3389. Freshly installed Ubuntu 22.04 LTS might not be running firewall by default. - You don’t need
polkit
configration related tweaks so simply skip it. - Next go to
Settings - Sharing
and toggle the switch in top right corner to on: - Natrually, next step would be proceeding to
Remote Desktop
item, switch both theRemote Desktop
andRemote Control
options on. The authentication section should show you the current credentials you used to login to Ubuntu:
You’re done, now you should be able to connect to your Ubuntu 22.04 LTS Desktop version via RDP, be very careful that xrdp does not seemed to support NLA(Network Level Authentication), tracked by this issue.
Bonus points:
- Since it is RDP you may configure it with Apache Guacamole™ for modern browser access without any RDP client installed.
- Since it is RDP you may use it with Windows Remote Desktop Gateway or even better, an open source implementation written in Golang.