Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've just installed crunchbang linux (based on Debian) on some really old hardware (we're talking single cores and DDR memory here) for a simple home server.

However, seeing as the hardware sucks (or for some other reason) X cannot start gdm. This really doesn't bother me because the server won't have a display, I will be ssh'ing in via my workstation. However it's a problem because when I reboot the machine it gets stuck on an X error message (something like "Cannot start X blah blah") and needs direct input to continue. Is there a way I can disable (or even remove) X and the X server from my machine so that I only ever boot into a command line? Is it safe?

share|improve this question
up vote 4 down vote accepted

If you just want to disable it:

update-rc.d -f gdm remove

If you want to remove it:

apt-get remove gdm

You only have to address the gdm package to keep X from starting. And yes, it is perfectly safe.

Also, depending on what version of Debian your CrunchBang server is based off of, you may be dealing with gdm3. If so, just replace gdm with gdm3 in the above commands.
dpkg -l | grep gdm will show what gdm you have installed.

share|improve this answer

If its debian based you should be able to use apt-get remove to remove the packages associated with X. Alternatively dpkg --remove should also work.

Here are the packages associated with X on my Ubuntu machine:

  • gdm
  • xserver-common
  • xserver-xorg
  • xserver-xorg-core
  • xorg
  • x11-common
  • x11-xserver-utils

Since both apt and dpkg handle dependencies, I'd think removing these packages should remove all the related X packages and you should be good.

share|improve this answer
Is that safe to do? Will it have any repercussions that have to do with my command line interface? – n0pe Aug 26 '11 at 19:27
Yeah disabling is is probably safer than removing it, but I if you don't use X at all, it should be safe to remove it as well. I haven't tested it though. I usually use a net install disk and don't download X related packages when I build a system that won't use X. – sbtkd85 Aug 29 '11 at 15:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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