We will carry out the installation on a server with the Ubuntu 20.04 operating system, but this instruction is also relevant for Ubuntu 18.04.
1. After installing the operating system, connect to the server via SSH using the putty program (how to do this) and update the current database with available packages:
2. Install the xfce package
apt install xfce4
During installation, the system will ask you to select a Display Manager. Select gdm3 and press Enter
Дождитесь завершения установки xfce
3. Install the xrdp package, then configure the xrdp server
apt install xrdp
After installing the package, the xrdp user will be created under which the xrdp server will run. The user is using the default certificate /etc/ssl/private/ssl-cert-snakeoil.key. Let's add the xrdp user to the ssl-cert group to grant read rights to the specified certificate.
adduser xrdp ssl-cert
After starting a user session (when connecting to the server via RDP), the /etc/xrdp/startwm.sh script is executed. Let's first save the original file
and add a script to start an RDP session. To edit the file, use the command
mv /etc/xrdp/startwm.sh /etc/xrdp/startwm.sh.bkp
and paste the script code into the opened file
Let's make the script we just edited executable:
if [ -r /etc/default/locale ]; then
export LANG LANGUAGE
Restart the xrdp service
chmod 755 /etc/xrdp/startwm.sh
and check its status
systemctl restart xrdp
systemctl status xrdp
As a result, you should see something like this:
4. To connect to the server via RDP, the standard port 3389 is used by default. It is this port that the xrdp server listens on.
It is necessary to provide access to port 3389 in the firewall settings.
For access from any IP:
or, if access is needed only from a specific IP address (for example, you can specify the external IP of your home network):
ufw allow 3389
* here instead of 184.108.40.206 enter your external IP address.
sudo ufw allow from 220.127.116.11 to any port 3389
5. To connect to a remote desktop, create a separate user by running the command
When creating a user, you must enter a password and confirm it (when entering a password, the characters will not be displayed - as it should be). It is not necessary to enter other requested data, you can skip it by pressing Enter.
If it is necessary to give the user the ability to enable administrative rights, run the command:
gpasswd -a xrdpuser sudo
6. To work on the server, you can install the software you need.
For example, the Mozilla Firefox web browser:
apt install firefoxThe program for working with mail (mail client) Mozilla Thunderbird:
Office suite (software for working with documents) LibreOffice:
apt install thunderbird
apt install libreoffice
7. To connect to the server from the Windows operating system, we will use the standard program "Remote Desktop Connection".
In the Computer field, enter the IP of your server and click Connect.
In the certificate request confirmation window, click Yes, after which you can see the server access data request window. Enter the username and password created in step 5:
After that, the desktop window of the xfce graphical shell installed on the server will open.
in which you can run standard and previously installed programs.