How to Install GUI on Ubuntu Server (An Easy Guide)

How to install gui on ubuntu server

Usually, it's not advised to run a GUI (Graphical User Interface) on a server system.  Operation on any server should be done on the CLI (Command Line Interface). The primary reason for this is that GUI exerts a lot of demand on hardware resources such as RAM and CPU. However, if you are a little curious and want to try out different light-weight Desktop managers on one of your servers, follow this guide.

In this tutorial, I am going to cover the installation of 7 desktop environments on Ubuntu.

  • MATE core
  • Lubuntu core
  • Kubuntu core
  • XFCE
  • LXDE
  • GNOME
  • Budgie Desktop

Prerequisites

  • Ubuntu server 18.04 or 20.04 with SSH access
  • A non-root user with sudo privileges

Before getting started, ensure that you update & upgrade your system

$ sudo apt update && sudo apt upgrade

Next, install tasksel manager.

$sudo apt install tasksel

Now we can begin installing the various Desktop environments.

1) Mate Core Server Desktop

Installing the MATE desktop use the following command

$ sudo tasksel install ubuntu-mate-core

A pop-up with information about display managers will be displayed as shown.

information about display managers
configuring lightdm

Simply press ENTER to proceed then select lightdm as the preferred display manager.

select the lightdm option
select the lightdm option

The installation of Ubuntu MATE core alongside all the dependencies will continue. Upon completion, start lightdm display manager as shown.

$ sudo service lightdm start

Alternatively, if you are using systemd ( Ubuntu 16.04 and later versions ) use the systemctl command as shown:

$ sudo systemctl start lightdm

Once started, logout or reboot your system and select the MATE option by clicking the gear wheel at the login screen.

Select MATE option
Click on gear wheel to select MATE option

Type in your password and hit ENTER to login to the MATE desktop environment as shown.

install mate-core desktop server
install mate-core desktop on ubuntu 18.04

2) Lubuntu Core Server Desktop

This is considered to be the most lightweight and resource-friendly GUI for Ubuntu 18.04 server
It is based on the LXDE desktop environment. To install Lubuntu execute

$ sudo tasksel install lubuntu-core

Once the Lubuntu-core GUI is successfully installed, launch the display manager by running the command below or simply by rebooting your system

$ sudo service lightdm start

Alternatively, if you are using systemd ( Ubuntu 16.04 and later versions ) use the systemctl command as shown:

$ sudo systemctl start lightdm

Thereafter, Log out and click on the button as shown to select the GUI  manager of your choice

In the drop-down list, click on Lubuntu

Log in and Lubuntu will be launched as shown

install lubuntu on Ubuntu server 18.04

3) Kubuntu Core Server Desktop

Xubuntu is yet another light-weight desktop environment that borrows a lot from Xfce desktop environment.

To get started with the installation of Xubuntu run the command below

$ sudo tasksel install kubuntu-desktop

Once it is successfully installed, start the display manager by running the command below or simply restart your server

$ sudo service lightdm start

Alternatively, if you are using systemd ( Ubuntu 16.04 and later versions ) use the systemctl command as shown:

$ sudo systemctl start lightdm

Once again, log out or restart your machine and from drop the drop-down list, select Kubuntu

install kubuntu on Ubuntu server 18.04

4) XFCE

Xubuntu borrows a leaf from the Xfce4 environment. To install it use the following command

$ sudo tasksel install xfce4-slim

After the GUI installation, use the command to activate it

$ sudo service slim start

Alternatively, if you are using systemd ( Ubuntu 16.04 and later versions ) use the systemctl command as shown:

$ sudo systemctl start slim

This will prompt you to select the default manager. Select the slim option and hit ENTER.

install xfce on Ubuntu 18.04

Log out or reboot and select 'Xfce' option from the drop-down list and login using your credentials.

Shortly, the  Xfce display manager will come to life.

install xfce4-slim on ubuntu server 18.04

5) LXDE

This desktop is considered the most economical to system resources. Lubuntu is based on LXDE desktop environment. Use the following command

$ sudo apt-get install lxde

To start LXDE, log out or reboot and select 'LXDE' from the drop-down list of display managers on log on.

install lxde on ubuntu 18.04 server

6) GNOME

The installation of GNOME  will take typically 5 to 10 minutes to install depending on the hardware and software requirements your server has. Run the following command to install Gnome

$ sudo apt-get install ubuntu-gnome-desktop

or

$sudo tasksel install ubuntu-desktop

To activate Gnome, restart the server or use the following command

$ sudo service lightdm start

OR

$ sudo systemctl start lightdm
install gnome on ubuntu server 18.04

7) Budgie Desktop

Finally, let us install the Budgie Desktop environment. To accomplish this, execute the following command

$ sudo apt install ubuntu-budgie-desktop

After successful installation, log out and select the Budgie desktop option. Log in with your username and password and enjoy the beauty of budgie!

installed budgie desktop on ubuntu
fresh install budgie desktop on ubuntu

Sometimes you need the GUI on your Ubuntu server to handle simple day-to-day tasks that need quick interaction without going deep into the server settings. Feel free to try out the various display managers and let us know your thoughts.

8 Comments... add one

  1. I installed like you wrote but when i login through ssh i get the command line no option to choose 'LXDE' from the drop-down list of display managers on log on

    Reply
  2. Adding a GUI/desktop environment to Ubuntu server kills a lot of the reasons to go with a sever distribution. Instead, consider some other tools that are available that give you a web-based GUI to manage some tasks and give great visibility into the server. The two I would recommend you try are Webmin and Cockpit. Webmin is full featured, while Cockpit is lite but good. There are some great YouTube video tutorials to check out.

    Reply
    • Thanks, John for your input. Sure GUI gobbles a lot of system resources and hence not recommended for a server. We were just providing an overview of how one can actually add a GUI to a minimalistic system.

      Reply
  3. I get this error when I run $ sudo service lightdm start
    Failed to start lightdm.service: Unit lightdm.service not found.
    Tks

    Reply
    • I too am trying to follow this tutorial, for the lubuntu desktop on top of ubuntu server 20.4.1.
      However it seems lightdm is not installed alongside lubuntu-core, so you have to install it manually using:

      sudo apt install lightdm

      The installation take quite a while.
      In the dialog that pops up choose lightdm as the default manager.

      I tried installing lubuntu-core both before and after lightdm, but it doesnt show up as a option in the "select desktop environment" dropdown - instead a default Ubuntu desktop env. and Ubuntu on Wayland are the only options.

      Any advice would be appreciated.

      Cheers Kurt

      Reply

Leave a Comment