I have an Linux (Ubuntu) virtual machine that's been setup as a desktop; it starts X and the full UI. I only need it as a server (will be accessing it via ssh) and am looking to reduce the memory footprint.
What's a good way to prevent X from starting when the machine boots?
Update: ended up going with:
sudo mv /etc/rc2.d/S30gdm /etc/disabled-S30gdm
via the link in Evan Anderson's answer.
You can disable GDM by:
Then re-boot and you should have your console window.
Go to System -> Administration -> Services and disable GDM
I don't use Ubuntu (I'm a CentOS / Fedora guy), but typically this is done with runlevels. I'm reading that, at least on Ubuntu "Gutsy", there isn't a runlevel that doesn't start X by default. What a pain!
Have a look at this guy's site-- it should at least give you an idea of where to look. http://caulfield.info/emmet/2008/03/add-a-textonly-runlevel-to-ubu.html
On RedHat-style distributions this would be easy... >smile<
I dunno about these techniques above to remove GDM, but I'd rather be able to select a different runlevel to get X back than go removing software.
Edit: Here's some potentially better thoughts: http://cviorel.easyblog.ro/2008/07/02/enabledisable-gdm-in-ubuntu/
in ubuntu there is a config file for gdm at
The lines you will want to alter are:
to be more like:
you can always get the gdm to run once you login using the command
startx
.http://ubuntuforums.org/showthread.php?t=1305659
Not sure about Ubuntu, but in RedHat/Fedora/CentOS, you just change the default runlevel in /etc/inittab to 3