Install and Use XRDP on Ubuntu for Remote Desktop Connection – It's FOSS

It's FOSS
A Linux and Open Source Web Portal
Last updated By 13 Comments
Brief: This tutorial goes over setting up XRDP on Ubuntu, which will allow for GUI connections to a remote computer.
Microsoft Remote Desktop Protocol (RDP) is a protocol that allows for graphical remote desktop connections from one computer to another. RDP works by having a main machine run software that allows several other computers to connect to it.
XRDP is an open-source implementation of RDP, removing the need to run any proprietary programs. XRDP not only tries to follow in the direction of RDP, but is also compatible with regular RDP clients such as Remmina and GNOME Boxes.
XRDP features a simple one-page interface, after which you’ll be right at your desktop:
While XRDP works great for getting remote access to machine, it’s important to know what XRDP isn’t good at.
Connections made over XRDP can be viewed and modified by attackers, and should thus be avoided for any sensitive information. This can be alleviated through the use of an SSH connection or with certificates, but both require a more complex setup and will not be covered here.
In my testing, XRDP didn’t ever seem to apply the theming Ubuntu comes with by default. Instructions for fixing this are available at the end of the article.
XRDP is designed and made to use in a GUI environment. If you plan on using it for a CLI environment, such as on a server, you should look at other tools, such as SSH.
This tutorial assumes the following setup to get everything working properly.
Installing XRDP is just a couple of steps, and is pretty straightforward to do.
Note
Before going anywhere, note that the “remote machine” will be the machine that all others connect to.
XRDP is included in most distributions’ repositories. On Ubuntu, it is available in the universe repository.
You can install it with the following command:
Good news is XRDP works right out of the box!
To connect to the machine you installed XRDP on, you’ll first need to install an RDP client on your local machine.
I’ll be using GNOME Boxes, which can be installed with the following:
GNOME Boxes is known more for virtual machine use, but it also supports a variety of other protocols, including XRDP.
If for whatever reason you don’t want to use Boxes, you can also use a client called Remmina:
Again though, note that I’ll be using Boxes throughout the rest of the tutorial.z
First off, Start GNOME Boxes, and click on the + sign and select “Connect to a Remote Computer…“.
Next, enter the IP address of the machine you’re connecting to, prefixed with rdp://, and then connect as shown below:
Not sure what your IP address is?
You can find your IP address with the ip address command. You’ll need to look for something that looks like a number split into four groups:
abhi[email protected]:~$ ip address
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: wlp0s20f3: mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether dc:46:b9:fb:7a:c5 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.107/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp0s20f3
valid_lft 6183sec preferred_lft 6183sec
Avoid any IP addresses named 127.0.0.1, as that one points back to the machine you ran the command on. There should be more IP addresses in the output, as shown above.
You should then be presented with a login screen. Keep “Session” set to “Xorg”, and just enter your username and password, then click “OK”:
After, you should be presented with the desktop of the remote machine:
And now you’re good to go! Everything will behave just the same as if the machine was right in front of you.
XRDP never seemed to get the theming correct for me. This can be fixed with a few steps.
First, on the remote computer, run the following command:
Next, open the Extensions app, and turn on the toggles shown below:
Now, close your remote desktop session and log back in. Next, open up Tweaks and configure everything per the screenshot below:
Lastly, open up dconf Editor, and navigate to /org/gnome/shell/extensions/dash-to-dock/, and set the values that are shown below:
And there you go! Everything is good to go, ready to do what you need to.
If something isn’t working quite right, or you have any questions or comments, feel free to leave them below.
Like what you read? Please share it with others.
Filed Under: Tutorial
Sole Linux user with Ubuntu running my desktops and servers. I do some music stuff in my free time, mainly with piano. You can check out some stuff I’ve made on my Website and on GitHub.
Why not use ssh -X instead. Can’t see a reason of using xrdp
SSH connections have been notoriously slow for me in the past, even on local connections.
I’ve yet to experience anything as significant with XRDP, but Xorg over SSH might be more ideal if you want something secure.
For Ubuntu (20.04.1, Gnome Desktop):
===================================
sudo apt update
sudo apt install xrdp
sudo apt install freerdp2-x11
sudo nano /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla
# Copy and paste the following into nano:
[Allow Colord all Users]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
ResultAny=no
ResultInactive=no
ResultActive=yes
sudo reboot
(or)
sudo systemctl restart xrdp
Join 75,000 other Linux users and start your journey to become a better, informed desktop Linux user.
It’s FOSS is Part of chmod777 Media Tech (OPC) Pvt Ltd· Built on Genesis Framework and Powered by UpCloud
Session expired
Please log in again. The login page will open in a new tab. After logging in you can close it and return to this page.

source

We will be happy to hear your thoughts

Leave a reply

LINXGO
Logo
Compare items
  • Total (0)
Compare