Before we begin to explain how to install and connect to Linux server with xRDP, let’s play around with the terminology so that you have a clear understanding of what XRDP is and how it works; Microsoft has developed a proprietary protocol called Remote Desktop Protocol (RDP) that aims at providing a graphical interface for connecting a Windows user to a remote computer.
The client software providing this feature is also called RDP. In this regard, XRDP is the implementation of RDP on another operating system, the Linux server in our case, which equips the user with the same feature. In this article, we mean to access a remote Linux server with XRDP.
Reliable, high-performance RDP servers with 99.95 uptime. Take your desktop on the go to all the major cities in the US, Europe, and Asia.
Get an RDP ServerHow does XRDP work?
To further clarify this for you, let’s say we have a remote Linux system to which we want to have access. Also, we have another system, not necessarily a Windows system, which you want to use to log in to the remote Linux system and establish a desktop session as though you are logged in locally.
In practice, we need to install RDP client software on the local machine and XRDP server software on the remote Linux machine to form the connection. You would also need to have the login credential and IP address of the remote Linux server.
Also Read: Introduction to Debian RDP Server [How to Install XRDP Server]
Please note that in case of proper set-ups more than one client could access the remote machine. Additionally, XRDP is free and open source. However, the aforementioned criteria are quite appealing for common use cases, it could expose your Linux server to unauthorized access.
Should you feel you have too much at stake, it is recommended to go for alternative security-based tools such as SSH to lower your risks. Furthermore, it is suggested to use other tools if Command Line Interface (CLI) is sufficient for your need, and you do not need to work in a Graphical User Interface (GUI) environment.
Install and connect to Linux server with xRDP
In this tutorial, we are going to show you how to install and connect to a Linux server, Ubuntu in our case, with XRDP.
Install Gnome or Xfce Desktop Environment
As a preliminary step, we are about to install a desktop environment (DE) on Ubuntu since we want to interact with our Linux server by more than using commands only.
Note: if you are on a desktop version of Ubuntu, ignore this step.
Note: To successfully install a DE, we first need to add a sudo user on Ubuntu, and run the associated commands using administrative privileges from there.
Two good desktop environments are introduced here. You may opt for one at your discretion.
Gnome is a default DE in Ubuntu 20.04 and we only need to pass in a few commands to install it.
sudo apt updatesudo apt install ubuntu-desktop
After running the last line, you are asked whether you want to proceed or abort the installation as 2111 MB of additional disk space will be used.
You may type in Y and press Enter, and wait for a while until the GUI packages are completely downloaded/installed.
There is also another DE called Xfce as the second option which is convincingly fast and graphically appealing. You may execute the following commands and the rest of the process is similar to installing Gnome.
sudo apt updatesudo apt install xubuntu-desktop
Install XRDP: Linux
Also Read: How to Enable RDP in Windows Server 2012?
Ubuntu already contains XRDP packages. Type in the following command to install it.
sudo apt install xrdp
XRDP will start functioning promptly after the completion of installation but you may also check out the status of XRDP by executing the below commands.
sudo systemctl status xrdp
Hold on a moment! XRDP is unable to function properly just yet! Linux Groups have been defined for security reasons and as a result of that, certain users are denied access to certain files. If some user needs extra privilege we can manually grant them the required access.
Reliable, high-performance RDP servers with 99.95 uptime. Take your desktop on the go to all the major cities in the US, Europe, and Asia.
Get an RDP ServerIn our case, XRDP needs to read “/etc/SSL/private/ssl-cert-snakeoil.key” but it is not a member of the associated group. Only the members of “ssl-cert” group are permitted to use this file. We are supposed to grant permission to XRDP users and we shall do that by executing the following command.
sudo adduser xrdp ssl-cert
Let’s restart XRDP to enforce the new setting.
sudo systemctl restart xrdp
Done! XRDP installation is finished.
How to check your IP address in Ubuntu
There are tons of ways to extract your IP address. One simple way that does not include distracting information is to execute this command.
hostname -I
Remote Desktop Protocol (RDP): Local Windows or Linux
Now we are supposed to put in the last Lego brick of our fancy bridge to connect to the remote Linux machine. If your local machine is on Windows, you may use the default Remote Desktop Connection to build the connection. Just simply open RDC, which acts as Remote Desktop Protocol, pass in the remote server’s IP address and click on connect.
Later on, you will be asked for credentials and done! You are in control of the remote Linux server. If your local machine is on Linux (Ubuntu), you may choose Gnome Boxes to set up RDP. Please type in the following commands:
sudo apt install gnome-boxes
Once the installation is finished, start Gnome Boxes and do as illustrated in the picture below.
After that, pass in the IP address of the remote machine and click on ‘connect’
In the below picture, ‘session’ should remain ‘Xorg’. Also, you may pass in the remote machine’s credentials and click on OK to proceed.
At this point, you must be capable of doing whatever you could do when using the remote server locally.
Enjoy the tool!
Also Read: Install Linux Bash on Windows 10
Conclusion
In this article, we initially defined some concepts about XRDP. Then we drew a set-up to clarify what will be instructed throughout the tutorial. We later concluded that the best practice is to use other tools if you are too much concerned about the security aspect of your remote connection. After that, we went over details on how to install and connect to a Linux server with XRDP. In our first step, we introduced two desktop environments and let you decide which one to choose for your Ubuntu server.
The next step was about how to install XRDP on your remote machine. The next part helped you retrieve your IP address the easiest way. Lastly, we launched RDP on Windows and Ubuntu so that it could come in handy if you decide to use either operating system to access the remote Linux machine. Please drop your comment down below if you ever encounter any problem when connecting to your remote Linux server.
0 Comment