Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently updated a few machines to 11.10. On one of them, the promt to chose between gdm and lightdm. I tried selecting light dm, but the upgrade tool inevitably returned to the same prompt. I then chose gdm and the upgrade completed.

But now when I tried to boot, the computer presents no login screen. I'm thinking that it's because GDM was uninstalled in the upgrade process.

How can I install lightdm or gdm without logging in traditionally?

PS: apt-get does not seem to work in recovery mode.

share|improve this question
apt-get do not work probably because of network problems. Try to login on a terminal, then run startx, or try to fix your network problems: it can be easy if you have a network cable and a DHCP server running dhclient eth0. – enzotib Sep 9 '11 at 14:04
up vote 2 down vote accepted

Press Ctrl+Alt+F1 to get to the first console. You should be able to login there.

I would try to reconfigure lightdm from this console.

sudo dpkg-reconfigure lightdm

Try installing if its missing

sudo apt-get install lightdm

If this doesnt help, check the desktop manager configured in this file

share|improve this answer
Thanks for the quick answer. I tried doing this but I got an error I managed to change the default DM to lightdm, but when I dot, I get two error messages: – Calixte Sep 9 '11 at 14:39
What says the error and at which command did this error appeared? – falstaff Sep 9 '11 at 14:42
dpkg-mainscript-helper: warning: environment variable DPKG_MAINSCRIPT_NAME missing [NEW LINE] dpkg-mainscript-helper: warning: environment variable DPKG_MAINSCRIPT_VARIABLE missing [NEW LINE] Apparently lightdm is installed (according to apt-get) – Calixte Sep 9 '11 at 14:43
never mind. I rebooted and now it works. Thanks! – Calixte Sep 9 '11 at 14:53

when booting, on the grub menu where you choose what OS to boot, select the normal option and press e you will now be able to edit the boot lines, select the line starting with kernel and press e again you are now editing the line that loads linux, right at the end of this line add a space and 3 press ESC and then b to boot with the modified line

this will cause you to boot into runlevel 3 which has no GDM or GUI at all and you should end up in a traditional terminal window. login and run the following command: sudo apt-get install gdm after this has completed, you should be able to reboot and get the usual login screen

if you can't access the grub menu for some reason, you'll need to boot the machine using a live CD and modify grub to allow you to access the menu

share|improve this answer
You have no knowledge of Debian/Ubuntu runlevels. – enzotib Sep 9 '11 at 14:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.