I was able to set up a text-only UI (CLI) by editing the file /etc/default/grub in Ubuntu 12.04 as per the instructions in:
How do I disable X (GUI) at boot so that the system boots in CLI mode? using these commands:
sudo nano /etc/default/grub
to open the grub file and replaced the line:
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
with
GRUB_CMDLINE_LINUX_DEFAULT=”text”
which sets CLI as default session.
But, how do I revert to X-session (GUI) as the default one? I don't want to log into text mode and 'start' the lightdm every time. So I tried replacing back the GRUB_CMDLINE_LINUX_DEFAULT="text"
to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
, and did update-grub
too, but something unexpected happened, an unbootable system! (probably the DM got meshed up) How do I fix this?
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.
No comments:
Post a Comment