17.4. Booting to Text Mode on Debian
Problem
Your Debian system boots X Windows automatically, probably with Gnome Display Manager (GDM), K Display Manager (KDM), or X Display Manager (XDM). But, Debian does not install with both text and graphical runlevels already configured like Red Hat; runlevels 2–5 by default are all the same. Because you chose a graphical login during installation, runlevels 2–5 all boot to a graphical login. How do you configure it to boot to a text-only session?
Solution
First, you need to know which display manager the system is using. Then, remove it from the appropriate runlevels. To see which one is running:
$ ps ax | grep dm
537 | S 0:00 /usr/bin/gdm
544 | S< 0:10 /usr/X11R6/bin/X :0 -dpi 100 -nolisten tcp vt7 -auth /var/
lib/gdm/A:0-PbCLdjThis tells us that GDM, the Gnome Display Manager, is running. First, remove it from all runlevels:
# update-rc.d -f gdm remove
update-rc.d: /etc/init.d/gdm exists during rc.d purge (continuing)
Removing any system startup links for /etc/init.d/gdm ...
/etc/rc0.d/K01gdm
/etc/rc1.d/K01gdm
/etc/rc2.d/S99gdm
/etc/rc3.d/S99gdm
/etc/rc4.d/S99gdm
/etc/rc5.d/S99gdm
/etc/rc6.d/K01gdmNext, have GDM start on runlevel 5, and stop on all the others:
# update-rc.d gdm start 99 5 . stop 01 0 1 2 3 4 6 . Adding system startup for /etc/init.d/gdm ... /etc/rc0.d/K01gdm -> ../init.d/gdm /etc/rc1.d/K01gdm -> ../init.d/gdm /etc/rc2.d/K01gdm -> ../init.d/gdm /etc/rc3.d/K01gdm -> ../init.d/gdm /etc/rc4.d/K01gdm -> ../init.d/gdm /etc/rc6.d/K01gdm ...Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access