How can I set my Ubuntu 12.04 LTS to boot to console without GUI? [duplicate]
So I installed Ubuntu server to run some tests on a VM. For various reasons I couldn't get a specific DEB file, and instead of using a shared folder I decided it would be a good idea to install ubuntu-desktop so I can run Firefox and grab the file directly from the web.
Now, every time I boot my machine I get the graphical interface, but I have no reason for it since I'm running tests with the LAMP server.
I tried this
How do I boot into console mode?
And this
Possible to install ubuntu-desktop and then boot to no GUI
If anyone has any idea for a solution, I'd appreciate it.
BTW: I thought about simply uninstalling ubuntu-desktop, but I feel like I might need it in the future, so, I really just want to disable the GUI.
EDIT:
While this solution is not perfect I realized, it works for now:
On the How do I boot into console mode? question, user Michael K mentions that:
" Okay another way would be to disable the lightdm service in init:
/etc/init/lightdm.conf
in there there is a section like this:
start on (filesystem
and started dbus
and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
or stopped udev-fallback-graphics))
"
While this worked perfectly, I can't access the GUI with the startx
command - the system just crashes. And I guess I'll need to uncomment the section to load startx.
Considering the fact that I want to keep the server running for as long as possible, having to restart it every time I want to log in the GUI is kinda unproductive.
EDIT2:
I guess it's possible simply to kill the GUI ( How to stop the Unity Desktop ) when I log in the system, it's still counter productive, but it works too.
EDIT3:
Michael K's reply worked fine. I just realized that to call the GUI I need to run lightdm
and not startx
That instructions works like a charm to me in my Ubuntu 12.04.1
Change (edit) in /etc/default/grub file:
From:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
To:
GRUB_CMDLINE_LINUX_DEFAULT="text"
Now you must update the grub configs:
sudo update-grub
And its done! After reboot, to start the gui just login and type:
sudo service lightdm start
On the How do I boot into console mode? question, user Michael K mentions that:
" Okay another way would be to disable the lightdm service in init:
/etc/init/lightdm.conf
in there there is a section like this:
start on (filesystem
and started dbus
and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
or stopped udev-fallback-graphics))
"
Then to call the GUI I just need to run lightdm
.