The instruction describes how to configure the xRDP server to connect to Ubuntu 18.04 with light-weighted environment as Xfce or MATE using the RDP protocol. This can be very useful when connecting from Windows operating systems without special tools.
What is xRDP?
Xrdp is a free, open-source implementation of Microsoft’s RDP (remote desktop Protocol) that allows non-Microsoft Windows operating systems (such as Linux and BSD) to provide a fully functional RDP-compliant remote desktop.
Installation and setup
Connect to the virtual server using SSH and perform the system update:
sudo apt-get update
Install and enable the xRDP tool:
sudo apt-get install xrdp
sudo systemctl enable xrdp
Choose and set the environment, Xfce or MATE, and allow xRDP to use it:
sudo apt-get install xfce4 xfce4-terminal
sudo sed -i.bak '/fi/a #xrdp multiple users configuration \n xfce-session \n' /etc/xrdp/startwm.sh
sudo apt-get install mate-core mate-desktop-environment mate-notification-daemon
sudo sed -i.bak '/fi/a #xrdp multiple users configuration \n mate-session \n' /etc/xrdp/startwm.sh
Open the RDP port for remote connection:
sudo ufw allow 3389/tcp
Restart the xRDP server for the changes to take effect:
sudo /etc/init.d/xrdp restart
To connect, open the Windows Remote Desktop application. Enter the server IP address and username and click Connect:
Picture 1. Remote Desktop Connection.
When connecting, a security warning will appear, since the connection is made to the Unix/Linux OS. Click Yes:
Picture 2. RDP Certificate accept.
In the following window, select Xorg in the session field, enter the password, click OK:
Picture 3. XRDP.
As a result, you will be connected to Remote Desktop. Xfce environment desktop:
Picture 4. Xfce.
MATE environment desktop:
Picture 5. MATE.