I installed gdm. Then I removed it with:
sudo apt-get remove gdm
sudo apt-get purge gdm
Now I can't pass Ubuntu logo at starup. How to enable lightdm back? Have tried
sudo dpkg-reconfigure lightdm
in curb but it not recognize command.
Ubuntu 12.04 uses LightDM as the default display manager. Assuming LightDM was working OK before you installed GDM, you should be able to fix this problem by making sure it's installed and properly configured.
Press Ctrl+Alt+F1 to get to a text-based virtual console where you can log in non-graphically. (Or you may already be at such a console.) Then run these commands. (If the first one fails, the others may still succeed.)
sudo apt-get update
sudo apt-get install lightdm
sudo dpkg-reconfigure lightdm
You may be given the opportunity to select your display manager. If you are, select LightDM.
Now either reboot (sudo reboot
/ Ctrl+Alt+Del) or run this command to start LightDM without rebooting:
sudo start lightdm
You should be able to log in.
If that doesn't work, but GDM had worked when it had been installed, then just put back GDM and configure your system to use it. That is, do the steps described above, but for GDM. For your convenience, after going to the virtual console and logging in, these would be the commands:
sudo apt-get remove lightdm
sudo apt-get update
sudo apt-get install gdm
sudo start gdm
You'll notice that I've added a command at the beginning to remove lightdm
(because it wasn't working anyway, and removing it guarantees it won't be run automatically instead of GDM). I've also not included a dpkg-reconfigure
command for GDM. That's because you said you had removed gdm
. So the apt-get install
command will be doing a fresh installation of the package, which will automatically perform whatever configuration is necessary (including giving you a choice between display managers, if you have another one installed).
I had the same problem and was able to fix it by making LightDM the default display manager:
echo /usr/sbin/lightdm > /etc/X11/default-display-manager
That command must be run as root (you can run sudo -s
first). Or run this command instead:
echo /usr/sbin/lightdm | sudo tee /etc/X11/default-display-manager
sudo dpkg-reconfigure lightdm
in curb. What's curb?