How to install Remote Desktop Service on the Ubuntu OS
In a scenario where we need to have GUI access on our remote server, it is good to have this cheat sheet in hand. What we will run through in this article is how to install remote desktop service on the Ubuntu machine. Remote desktop we'll install and configure is
XRDP. Let's check out the steps!
XRDP to serve a GUI we need to have one. We'll go ahead and install GNOME because it is a preferred environment for us, doesn't have to be for you 😁.
- update OS, if not already:
$ sudo apt update
- Install XFCE packages:
$ sudo apt-get install gnome-session gdm3
Now, let's install the XRDP:
$ sudo apt-get install xrdp
Cool! We have installed the XRDP service! Now, if you are running a firewall (ufw service) on your machine, you need to make sure that it's accessible on port 3389:
$ sudo ufw allow from 184.108.40.206/24 to any port 3389
Connecting to XRDP (Remote Desktop)
We will be using the Microsoft Remote Desktop app available on our local test machine running macOS. Note that there are many other options for good RDP software, this one I find appealing at the moment 😁.
Open the app (after you install it from App store) and choose the option "Add PC". The following dialog opens and you are required to enter the IP address of the server running XRDP service (where we used example 220.127.116.11); the rest of the settings are left as below:
Note that we have the "User account" option left on "Ask when required". We'll leave it like this so that we don't keep sensitive login details stored within the app. When this setting is saved you can see the server in the list as follows:
Alright! Now, double click on the available server in the list opens the login dialog. This happens because we left the "User Account" option on "Ask when required":
Feel free to continue through following warning:
Almost done! Next window will be actual remote desktop powered by GNOME environment:
That's it! We have successfully established a remote desktop connection to our Ubuntu server.