Well, I was so excited to install gnome after the fresh install of Ubuntu 16.04. So then I installed gnome-shell and when it came down to picking up the gnome type, I selected gdm and didn’t select the lightdm.
After this, I restarted my machine and it couldn’t boot up.
I tried googling and tried uninstalling gnome itself, but it didn’t work at all.
Many of Stackoverflow threads suggested me to switch to the terminal version pressing alt + shift + f1 and switch back to lightdm using the command
– sudo dpkg-reconfigure lightdm

But it didn’t work.

And then I restarted the ubuntu to recovery boot.
And chose DPKG repair option there.

And opened the terminal from the option after opening in safe boot.
And tried

– sudo dpkg-reconfigure lightdm

It worked!
First, the boot didn’t allow me to choose among the desktop-environments and then I restarted and thus