To install a desktop (graphical interface) and remote desktop on Ubuntu Server 20.04, you can follow these steps:
-
Install the Desktop Environment. Open the terminal and enter the following command to install either the Gnome or Xfce desktop environment (execute one of the two):
- To install Gnome:
sudo apt update && sudo apt-get upgrade && sudo apt install ubuntu-desktop
- To install Xfce:
sudo apt update && sudo apt-get upgrade && sudo apt install xubuntu-desktop
.
- To install Gnome:
-
Install Remote Desktop. Enter the following command in the terminal to install the Xrdp service:
- To install Xrdp:
sudo apt install xrdp
.
- To install Xrdp:
After the installation is complete, the Xrdp service will start automatically. You can connect to the Ubuntu Server using the default RDP client on Windows by entering your username and password, then clicking “OK”.
If you’re using Ubuntu 20 or a later version, you may experience a crash when attempting to connect, so an additional configuration step is necessary.
On Ubuntu 20, you need to grant the xrdp user permission to access certificates:
|
|
You also need to specify which desktop environment xrdp should use when starting a session. Configure xrdp to use xfce as the desktop environment:
|
|
Restart the xrdp service to apply the changes:
|
|
Please note that installing a desktop environment on an Ubuntu Server may increase resource consumption. Therefore, if your server is intended solely for command-line operations or pure server functionalities, you should weigh the performance and security considerations before deciding to install a desktop environment.