Quick Links
Key Takeaways
- Turn on "Desktop Sharing" on the Ubuntu computer you want to RDP to. It's in "Settings" under "Sharing." Also, create a username and password for the RDP connection.
- Install an RDP client on the computer you wish to make the RDP connection from.
- Enter the RDP account credentials and the network location of the Ubuntu computer in the RDP client to make a connection.
Making a connection to a remote Ubuntu computer is easy. Everything you need to configure the remote computer to accept incoming connections is already built into Ubuntu. Here’s how to do it.
Use RDP and Not VNC, Here's Why
Virtual Network Computing is one way to share the desktop of a remote computer with a user on a client computer located elsewhere. The problem with VNC is it is no longer considered a secure protocol.
In fact, the VNC back end for the GNOME remote desktop functionality has been turned off by default in GNOME, and Ubuntu have followed suit. Restoring it requires building various components from source with the appropriate build flags reinstated.
But even then, you’ll still run into problems because Wayland interferes with VNC, and Wayland is the new normal on Ubuntu. You could revert to X11, rebuild the GNOME remote desktop components, and install the missing VNC server software, but that’s a lot of effort, and it still leaves you using a dated and insecure technology.
The preferred method, and one natively supported by GNOME and Ubuntu, is to use the remote desktop protocol instead of VNC.
RDP and Internet Security
Although RDP offers security and a smoother user experience, it is something that the average domestic Ubuntu user should only use across their own network, and not across the internet.
To remotely connect to a computer requires exposing an IP address and a port to the vagaries of the internet. The bad guys use automated software to scan for RDP ports, and then attack them. A study by Microsoft, the authors of the RDP protocol, found that these brute-force attacks are carried out slowly over a period of days to prevent the attackers’ IP addresses from being blocked for suspicious activity.
Unless you are very confident in setting up and using VPNs, two-factor authentication, and detecting and blocking suspicious activity, you shouldn’t use RDP across the public internet.
Supporting or monitoring computers on your local network with RDP is perfectly fine.
Setting up Desktop Sharing on Ubuntu
Setting up desktop sharing on Ubuntu is simple. Click on the system icons in the top-right corner of the GNOME top bar to open the system panel, then click the “Settings” icon.
When the “Settings” application opens, click on “Sharing” in the sidebar.
Click on the “Remote Desktop” option to open the “Remote Desktop” dialog.
Click the “Remote Desktop” and “Remote Control” sliders so that they are selected.
In the “Authentication” section, click on the pencil icon for each of the “User Name” and “Password” fields, and provide a username and password. These do not need to relate to any user account, and it is more secure if they don’t.
Close the “Remote Desktop” dialog and the “Settings” application.
That’s it. Now we can try to connect from another computer. On Linux, that means using an RDP-capable client.
Installing Remmina
Remmina is a remote desktop client. It is bundled with many Linux distributions, including Ubuntu. If it isn’t already on your Linux computer, it’ll be found in your distribution’s software repositories.
On Fedora, we installed Remmina with this command.
sudo dnf install remmina
On Manjaro we use pacman.
sudo pacman -S remmina
On Manjaro, we had to install FreeRDP as well.
sudo pacman -S freerdp
You can also install Remmina as a Flatpak.
Connecting From a Linux Computer
With Remmina installed, we’re ready to make a connection to our remote Ubuntu computer. Start Remmina, select “RDP” from the drop-down menu, and enter the IP address of the remote Ubuntu computer.
Press “Enter” when you’re ready to proceed. You’ll be prompted for the username and password that you entered into the Ubuntu “Remote Desktop” dialog when you were configuring desktop sharing.
Enter these credentials, then click the “OK” button.
You’re connected to the remote Ubuntu computer. You can interact with it as though you were using the keyboard and mouse of the Ubuntu computer itself. A button appears in the system area on the Ubuntu computer.
This allows the person who is using the Ubuntu computer to disconnect a remote connection.
To save you from having to manually enter your credentials each time you wish to connect to a remote computer, you can store the connection details in Remmina.
Click the “+” button to open the “New Connection Profile” dialog.
In the “Name” field enter something that will identify this connection, such as the name of the remote computer. In the “Protocol” drop down, select “RDP - Remote Desktop Protocol.”
Enter the credentials for the connection in the “Username” and “Password” fields, then click the “Save” button.
Double-clicking the connection in the Remmina main window will connect to the remote computer, and automatically authenticate for you.
Connecting from a Windows Computer
Not surprisingly, as Microsoft were the developers of RDP, you don’t need to install anything on a Windows computer to use it. Just type “rdp” in the taskbar search box, and hit “Enter.” The “Remote Desktop Connection” dialog opens.
Enter the IP address of the remote computer, then click the “Show Options” button to expand the dialog.
In the “Username” field, enter the username you entered into the Ubuntu “Remote Desktop” dialog when you were configuring desktop sharing. Click the “Connect” button. You’ll be prompted for the password.
If the username isn't the one you used in your RDP credentials, click the “More Choices” link, select "Use a Different Account" and type in the correct username. If the name being shown is the correct username, provide your password and click the "OK" button.
You’ll see the remote Ubuntu desktop in a window on your Windows desktop.
The Long Arm of the Admin
If you're looking after a collection of computers on your home LAN, try desktop sharing and remote desktop access as a way to reduce your administration effort. It can be transformative.
Just because you're the local go-to expert. it doesn't mean you need to physically go to every computer for every little tweak.