In order to install a graphical interface on Ubuntu Server 20.04 please follow the following steps:

sudo apt update
sudo apt upgrade
cd /tmp

wget -c -O headers.deb
wget -c -O image.deb
wget -c -O module.deb

sudo dpkg -i *.deb
uname -r
sudo install tasksel


After installation is complete, run the following command to make sure your system boots into the graphical target after reboot

sudo systemctl set-default
sudo reboot

We still have a few more modifications to make in order to login with with root.

Next step is to edit the /etc/gdm3/custom.conf GDM configuration file to allow root login, by adding the following line.

Next, edit PAM authentication daemon configuration file /etc/pam.d/gdm-password and comment line which denies root access to graphical user interface.

To do so edit file /etc/pam.d/gdm-password and put # in front of the line containing:

auth required user != root quiet_success
sudo reboot
You can now enjoy your Ubuntu Server with GUI
Was this article helpful?
Thank you!