XRDP is an open-source version of RDP (Remote Desktop Protocol). If you would like to access your shell using a Remote Desktop Connection on Windows, this can be done by using an XRDP server. In this article, we will guide you through installation and establishing a connection to your Ubuntu Shell.
In order for XRDP to work as intended, you will need to purchase a pubic IP. Please click on the link below for instructions on how to do so.
First, we will need to open a terminal session by selecting on bottom right of the Ubuntu desktop and type in the search bar up top to open.
Next, we will update our system packages
sudo apt update
After our update, we will install XRDP server.
sudo apt install xrdp
Then, let's start and enable XRDP. We use "enable" to make sure the XRDP will start at boot.
sudo systemctl start xrdp
sudo systemctl enable xrdp
After that, let's check the status of XRDP. If all is working, you should see a status like in the screenshot below.
sudo systemctl status xrdp
Now, we need to add xrdp to ssl-cert user group. XRDP uses an ssl certificate and we need to make it readable to our user.
sudo adduser xrdp ssl-cert
Installing and configuring XFCE
We need to install XFCE4 because X11 for XRDP does not work with gnome that well. Use the command below to install.
sudo apt install xubuntu-desktop
Once that installation is finished, we will edit our xsession file. We will use the echo command to do this. This will force all XRDP sessions to use XFCE4.
echo xfce4-session >~/.xsession
Now, we need to restart XRDP
sudo systemctl restart xrdp
Configuring UFW Firewall
We will need to allow access to our XRDP from the remote end. We will be using the UFW firewall on Ubuntu to do so. So first let's make sure that we have UFW installed and enabled
sudo apt install ufw
sudo ufw enabled
After that, for security reasons, we will only allow the IP address from the remote end to access our XRDP server and deny all other hosts.
sudo ufw allow from ‘public IP of remote host’ to any port 3389
replace “public IP of remote host” with your public IP that you will be connecting from. If you are unfamiliar with getting that info you can google search: "what is my IPv4 address" and you should be able to locate your public IP with the search results.
Connecting to your XRDP server using Windows RDP
On Windows 10, on the bottom left in the search field type remote and click on Remote Desktop Connection once you see it populate. Once opened you should see a window like the one shown below.
Enter the public IP that you have purchased from ShellsTM and click Connect. After that, log in with your Ubuntu username and password
Now you should be logged in to your XRDP session. You can also use Remmina to access an XRDP session from a Linux desktop.