Ubuntu servers are managed from the command line and do not have a desktop environment installed by default. If you run the desktop version of Ubuntu, skip this step.
There are various desktop environments available in Ubuntu repositories that you can choose. One option is to install Gnome, which is the default desktop environment in Ubuntu 20.04. Another option is to install Xfce . It is a fast, stable, and lightweight desktop environment, which makes it ideal for usage on a remote server.
Run one of the commands below to install the desktop environment of your choice.
Install Gnome:
sudo apt update
sudo apt install ubuntu-desktop
Install Xfce:
sudo apt update
sudo apt install xubuntu-desktop
Depending on your system, downloading and installing GUI packages will take some time.
Xrdp is incuded in the default Ubuntu repositories. To install it, run:
sudo apt install xrdp
Once the installation is complete, the Xrdp service will automatically start. You can verify it by typing:
sudo systemctl status xrdp
The output will look something like this:
● xrdp.service - xrdp daemon
Loaded: loaded (/lib/systemd/system/xrdp.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2020-05-22 17:36:16 UTC; 4min 41s ago
...
By default Xrdp uses the /etc/ssl/private/ssl-cert-snakeoil.key
file that is readable only by members of the “ssl-cert” group. Run the following command to add the xrdp
user to the group :
sudo adduser xrdp ssl-cert
Restart the Xrdp service for changes to take effect:
sudo systemctl restart xrdp
That’s it. Xrdp has been installed on your Ubuntu server, and you can start using it.