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 https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.8/amd64/linux-headers-5.8.0-050800_5.8.0-050800.202008022230_all.deb -O headers.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.8/amd64/linux-image-unsigned-5.8.0-050800-generic_5.8.0-050800.202008022230_amd64.deb -O image.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.8/amd64/linux-modules-5.8.0-050800-generic_5.8.0-050800.202008022230_amd64.deb -O module.deb

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

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 graphical.target
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.

AllowRoot=true
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 pam_succeed_if.so user != root quiet_success
sudo reboot
You can now enjoy your Ubuntu Server with GUI
Was this article helpful?
Cancel
Thank you!