How to install Desktop GUI on Ubuntu 20.04?

Overview

An Ubuntu instance is generally accessed through command line interface (CLI). But, you can install Ubuntu Desktop on your Ubuntu server and then access it through RDP using log Microsoft Remote Desktop app. Using GUI you can use and manage your server environment with ease.

Prerequisites

There are certain prerequisites that need to be met before you begin.

  • An Ubuntu 20.04 or latest server with minimum 2 vCPUs, 4 GB RAM, and 25 GB storage.

  • Remote Desktop on your local system.

Get Started

Step 1: Installing xrdp display server

To interact with the your local system, you need to install xrdp display server. Installing a display server allows RDP clients to read the mouse clicks and keyboard stokes.

  • Update all dependencies by entering the below command:

    sudo apt-get update
  • Use the following command to install xrdp application on your server.

    sudo apt-get install xrdp​
  • Type the following command to enable xrdp on server boot.

    sudo systemctl enable xrdp​
  • Allow traffic on port 3389, by using the following command and in your security group.

    sudo ufw allow 3389/tcp​

Step 2: Installing Ubuntu Desktop GUI

Use the following command to install the Ubuntu Desktop app (an official GUI program for Ubuntu).

sudo apt-get install ubuntu-desktop

Note: It may take 15-20 minutes to complete installation.

Step 3: Adding a User

You need to have root access to create a user, type the following command to enable root access:

sudo -i
  • You need to have a user ID and password to log in to Ubuntu remotely. Use the command given below to create a new user and enter a password for authentication.

    adduser your_new_username​
  • Optionally, you can fill in the details shown on the screen, and press Y to confirm.

  • Reboot the instance in order to apply the changes done.

    reboot​

Step 4: Access the server through Remote Desktop

After rebooting the instance, you can log in to your Ubuntu server via MS Remote Desktop application.

  • Open the MS Remote Desktop app on your local system.

  • Enter the IP address of your instance in Computer.

  • Enter your name of the user created in step 3 in Username field.

  • Press Connect button.

  • Enter the user credentials you created in step 3.

  • An RDP window with Ubuntu desktop GUI should open on your system. Follow the steps shown on screen to complete the first-time setup.

Conclusion

Now you will be able to access your Ubuntu instance using GUI and easily use and manage your server. You can install the programs like any computer easily by downloading them from the browser and running the .exe installation.

Last updated