Crosspost from AskUbuntu

I have a laptop I'm running as a file server, which is running Ubuntu 10.04 Desktop. Now that summer heat is here, and because I love the environment, I'm look for all sorts of ways to reduce the laptop's power/memory/heat footprint.

One part I never touch any more is the GUI as the lids always closed.

I thought perhaps simply removing GDM from all run-levels my achieve this, so I did so using sysv-rc-conf. However this didn't make any difference and upon reboot the lovely Ubuntu boot screen and graphical login prompt appeared.

Please help!

Additionally, perhaps this is a silly question, I want to make sure that the monitor is off at all times the lid is closed, which it is already set to do when the GUI is running, can/do I need to configure this separately for non-GUI environments? (Seems to be doing this fine)

Thanks :D

EDIT: Ok maybe I'm using sysv-rc-conf wrong and it needed 2 reboots to apply the settings or something? As rebooting it a second time since removing GDM from all run levels I got a command prompt.

However I didn't watch it reboot and was a little confused by this, so I rebooted what I believe to be a 3rd time, and now it's booted to a black screen with a solitary white underline in the top-left, no other text. No amount of keyboard mashing in order to change run levels is having any effect, however I am able to access it via SSH and the SMB shares, so I suppose it's doing almost what I want. The lack of a CLI on the screen itself is still concerning however.

SOLUTION: I ended up going with the answer posted in the AskUbuntu Question. Which fixed whatever I screwed up above, and now I've got me a headless server.


Since Ubuntu 10.04 uses "upstart" for initialisation, on fresh installs /etc/inittab is not there (anymore).
Check this article: Modifying the run level in Ubuntu 10.04
Oh and the default runlevel on headless systems is 2.

  • So GUI elements etc will only ever be loaded into memory if I change to that particular runlevel? Apologies for my stupidity in this area, for some reason I've always kept runlevels away from the top of my to-do list! – DanH Jun 8 '11 at 14:44
  • If you start Ubuntu in text mode (CLI only, e.g. the "press 'e' option" in the provided article), nothing GUI-related will be started and/or loaded into memory at all! – Henk Jun 8 '11 at 14:59

Change the default runlevel on /etc/inittab from runlevel 5 to runlevel 3:


  • # cat: /etc/inittab: No such file or directory – Henk Jun 8 '11 at 14:35
  • I saw this advice in a thread from 2005, but I can confirm there's no trace of inittab under /etc. Must be an old way of doing things – DanH Jun 8 '11 at 14:42

You can stop gdm from starting with sudo update-rc.d -f gdm remove

Re-add with sudo update-rc.d gdm defaults


You can edit /etc/init/gdm.conf.

Change stop on runlevel [016] to stop on runlevel [0126]. This will cause gdm not to start at runlevel 2, since the default runleve of Ubuntu is 2.

gdm upstart job will automatically start when some other jobs are started or some other events are emitted. This is why it still starts even you remove the symlinks to /etc/init.d/gdm by update-rc.d or something alike.

You can have a look at upstart docs. Hope this helps.

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