How to revert back to GUI as the default interface from CLI in Ubuntu desktop?

Found the solution! So I'm posting it here myself...

To revert back to a graphical login and session (X session), GRUB_CMDLINE_LINUX_DEFAULT="text" in the /etc/default/grub file should be replaced by GRUB_CMDLINE_LINUX_DEFAULT="quiet splash reboot=bios" (or GRUB_CMDLINE_LINUX_DEFAULT="quiet splash reboot=api" for some Dell laptops). After having done this editing, save the file and run the update-grub command, and then reboot to see if the graphical login greeter appears. If it does, that's it... you can then log-in...

But if you still remain stuck with the problem (like I was..), you can try using gdm as your display-manager (DM) or you could also try reinstalling lightgdm. I uninstalled lightgdm and set gdm as the new manager with the command that follows:

sudo stop lightdm
sudo start gdm
sudo dpkg-reconfigure lightdm 

and choose the DM you want so that it is set as the default option.

If your choice of DM was gdm, now you may uninstall lightdm, sudo apt-get remove lightdm, and sudo reboot. And there you are with our old gdm graphical display-manager.

But if you choose lightdm which if which crashed earlier like mine did, you'd like to do a reinstall of lightdm instead like described below:

Log-in to a new tty (press Ctrl + Alt + F1) and enter the commands;

sudo stop lightdm
sudo apt-get purge lightdm
sudo apt-get install lightdm 

and then set lightdm as the default manager and reboot to see it in effect.