Currently, there are many options for remote connection to workplaces. In addition, the cost of renting a good performance virtual machine in the cloud per month is comparable to the price of a good cup of coffee. It is convenient to use such remote virtual machines from weak office computers, from trips with a laptop and a weak Internet connection, to run long-term tasks on them, such as re-posting documents in 1C, downloading large files. You can also organize a shared server based on Ubuntu 20.04 in the cloud or on a powerful computer and share its resources using remote access. In this article, we will walk you through the XRDP installation of Ubuntu 20.04. The content of the article: What is XRDP
Step 1. Search for a package
Step 2. System update
Step 3. Installing packages
Step 3. Configuring XRDP Service
Step 4. Finding the IP address
Step 5. Checking the connection
XRDP black screen error in Ubuntu
Conclusions What is XRDP XRDP is an open source implementation of Microsoft’s Remote Desktop Protocol (RDP) that allows you to graphically control a remote system. Unlike a commercial product, XRDP in Linux allows an unlimited number of users to work simultaneously with one computer or virtual machine, which makes it possible to actively use XRDP to deploy terminal servers based on Ubuntu 20.04.
Installing XRDP on Ubuntu 20.04
Step 1. Search for a package On Ubuntu 20.04, you can get the program to install using the apt utility. Let’s install XRDP from the Ubuntu 20.04 repository. To do this, using the terminal, you can check if the xrdp package is in the Ubuntu 20.04 package repository: sudo apt searh xrdp aCOhrPoejVMAAAAASUVORK5CYII =
Step 2. System update There is such a package, so you can, after updating the system, install xrdp on Ubuntu 20.04 in a simple way. Update and reboot to accept changes to the OS: sudo apt –y update && sudo apt –y upgrade && sudo reboot BwrmmDYoSnOJAAAAAElFTkSuQmCC
Step 3. Installing packages After reboot, XRDP can be installed from Ubuntu 20.04 repository sudo apt install xrdp I draw your attention to the fact that during installation a certificate is generated, which is necessary for the functioning of the RDP protocol, the line below indicates that the certificate was successfully created: ssl_gen_key_xrdp1 ok DfbbccYc54AAAAAElFTkSuQmCC
Step 3. Configuring XRDP Service Due to the peculiarities of the Ubuntu 20.04 system, it is necessary to enter the xrdp user, on whose behalf XRDP works in the system, into the ssl-cert group. Run the command: sudo adduser xrdp ssl-cert Then add the xrdp service to autostart and restart it to apply the changes: sudo systemct enable xrdp sudo systemctl restart xrdp 3r3tgckokiLAAAAAElFTkSuQmCC sudo systemctl status xrdp If the result of the command execution looks like the screenshot, then everything went well. Finally, grant access from the external network to port 3389 in the Ubuntu 20.04 firewall: sudo ufw allow from 192.168.2.0/24 to any port 3389 sudo ufw allow 3389
Step 4. Finding the IP address Using any RDP client, you can connect by computer name, perhaps for this you need to additionally configure DNS. Better to access by the IP address of the server on which XRDP is installed. To find out the IP address, you must enter the command in the terminal: sudo ip a + pQaqmDqAAGAAAAAElFTkSuQmCC In my screenshot, the IP address of a virtual machine running Ubuntu 20.04 is circled, which is automatically assigned to the eth1 network interface. There can be several network interfaces, each of them can have their own IP-addresses, to which you can also connect via RDP.
Step 5. Checking the connection The standard RDP client for Windows is called Remote Desktop Connection. It is necessary to enter the IP address or server name in it, you can specify the login and password to log into the remote machine, configure various interaction parameters. In the screenshot below, you can see the Xorg login window, where you need to enter a login, in my case user and password, in my case 1. To change the keyboard layout in Ubuntu 20.04, use the Super + Space key combination (from my keyboard, the Windows + Space key). If the layout does not change in the window, and the password is entered in the wrong language, then you need to disable the RDP client, close it, change the language in Windows to the desired one and reconnect to the remote machine. YPPzk8h + 9BcAAAAASUVORK5CYII = The XRDP setup of Ubuntu 20.04 is almost complete.
XRDP black screen error in Ubuntu B8YC4whhvEr + QAAAABJRU5ErkJggg == To fix this error, you need to make a change to the file located in the / etc / xrdp folder that starts each XRDP remote access session named startwm.sh: n5a4x + AgAAAABJRU5ErkJggg == Modify the startwm.sh file: unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR Before the line: test –x / etc / X11 / Xsession && exec / etc / X11 / Xsession as shown in the screenshot. This is reset