Warning
This article is intended to guide you if you have a multi-user system, as Caldera does not offer direct support on this topic. Please include your IT staff to assist you in the process.
The information below is a summary of the official Ubuntu documentation and the Tips and FAQ of the xrdp project. If you want to know more details, please visit their websites directly.
What is RDP?
RDP stands for Remote Desktop Protocol. It's the protocol developed by Microsoft and used in Windows. The protocol specification is open and can be found on Microsoft's site.
The most basic part is named [MS-RDPBGCR] (RDP Basic Connectivity and Remoting Graphics).
Many other extensions can be found by name prefixed MS-RDP.
What is xrdp?
Xrdp, usually spelled in lowercase, is an open-source implementation of the RDP server.
Xrdp allows RDP clients to be presented with an X Windows desktop to the user.
Installation
Simple setup with no user logged into the console
This is a simple setup without using TLS and certificates. Also, it requires that no person is logged into the console when attempting to connect.
1- Starting with Ubuntu 18.04, first install xrdp:
sudo apt-get -y install xrdp
2- Next, one may adjust the configuration file:
sudo nano /etc/xrdp/xrdp.ini
3- Set encryption level to high:
encrypt_level=high
4- Next, allow just RDP through the local firewall:
sudo ufw allow 3389/tcp
5- Next, create a polkit configuration file:
sudo nano /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf
6- And input inside it:
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;
}
});
7- Finally, restart xrdp and you should be able to connect:
sudo /etc/init.d/xrdp restart
FAQ and troubleshooting
- When installing xrdp and logging in with a remote desktop client (xorg) you will get an empty desktop (so no icons, only the top left activity screen).
To get it to populate with the same icons as the local session, you can use one of the scripts in this repository (find the version that works with your Ubuntu version). - From Windows, attempting to connect one gets the error message:
Remote Desktop Connection
This can happen if TLS is set up incorrectly.
The connection cannot proceed because authentication is not enabled and the remote computer requires that authentication be enabled to connect. - From Windows, use Remote Desktop Connect to connect, and after inputting the username and password at the xrdp login screen one gets a password prompt noting:
Authentication Required
However, the prompt reappears after inputting the correct password. This is due to not adding a polkit rule.
Authentication is required to create a color profile - From Windows, use Remote Desktop Connect to connect, at the xrdp login screen using Session Xorg, after inputting the username and password one gets a blank screen. This can happen due to how one is logged into Ubuntu at the console. Unfortunately, by default, it does not act like Windows, where the console will become locked, and the console session will be redirected to the RDP connection. One will have to log out first.
- From Windows, use Remote Desktop Connect to connect, at the xrdp login screen using Session Xorg, after inputting the username and password one logs in but no docks exist.
Log out of the RDP session, at the console login screen login click the gear icon and choose Ubuntu > Open the application Tweaks > Extensions > Ubuntu dock > ON