Table of Contents

Proxmox - Guests (VMs and Containers) - Install a GUI

Most containers are server only, and do not come with a GUI.

To have a GUI installed, try the following.


Quick Options


Against Ubuntu 20.04 Container

apt-get update
apt-get install ubuntu-desktop

NOTE: After a reboot, this should get a graphical login prompt.


For a minimal install

apt install --no-install-recommends ubuntu-desktop

NOTE: To have a very basic GUI.

  • The –no-install-recommends will exclude major software and tools such as libreoffice, firefox , thunderbird etc.

Install a display manager

A Display Manager is responsible for starting the display server and loading the desktop while managing user sessions and authentication.

By default, GNOME Desktop uses GDM3 as its display manager, but it is a bit heavy on the resources side.

Install

A lighter and more resource-friendly display manager can be used.

sudo apt install lightdm

Start

Start the display manager and load the GUI with the following command:

sudo service lightdm start

To check what display manager is configured in your system

cat /etc/X11/default-display-manager

returns:

/usr/bin/lightdm

To shutdown the GUI

sudo service lightdm stop

Add a non-root user

Many systems do not recommend or allow root login.

They also require that the user has a home directory.

add user peter
add user peter sudo

NOTE: The sudo at the end adds the user, peter, to the sudo group.


Tips


How to remove the GUI from Ubuntu server

sudo apt remove ubuntu-desktop
sudo apt remove lightdm
sudo apt autoremove
sudo service lightdm stop

References

https://help.ubuntu.com/community/ServerGUI

https://askubuntu.com/questions/53822/how-do-you-run-ubuntu-server-with-a-gui