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:
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="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?