Howto Boot debian in text mode instead of graphical mode (GUI)
Posted by Admin on August 29th, 2007
You can prevent automatic running of the GUI when you boot your debian machine by disabling your login manager be it KDM, GDM or XDM from running at boot time. To disable the login manager from automatically running at boot up, run the following command as root
#update-rc.d -f gdm remove
Replace gdm with kdm or xdm if they are what you use.
To start X manually, you would then have to login at the command prompt and enter the command startx.
To reset your login manager so that it runs at boot up, do
#update-rc.d -f gdm defaults

August 29th, 2007 at 8:26 pm
Hi!
I usualy boot into text-Mode. I also have this line in my .bash_profile:
if [ "$(echo $(who am i)|awk '{print $2}')" = "tty1" ]; then startx;logout;fi
So when i login at the first Terminal then the windowmanager is started via .xinitrc. I like this much more than all the gdm/kdm/xdm stuff because it uses only MY configs and not those of any admin and the x server is started by the user who’s actually using it.
September 9th, 2007 at 1:47 pm
I believe this will result in the login manager being enabled again the next time it is upgraded. update-rc.d is *not* for administrators to use — it is only for package maintainer scripts to use to install their startup links.
The correct way to disable a service (such as GDM) from being started in a given runlevel (e.g., 2 which is Debian’s default runlevel) is like so:
mv /etc/rc2.d/S30gdm /etc/rc2.d/K70gdm
Further information can be found in /etc/rc2.d/README.
September 9th, 2007 at 6:59 pm
Very nice article.
September 10th, 2007 at 12:55 pm
There is a nifty tool called rcconf that can manage run level symlinks for you. Using this tool it is not required to enter each rc*.d dir and manually rename a symlink. It speeds things up a bit.
September 10th, 2007 at 2:45 pm
Autologin:
you will want to apt-get remove gdm, kdm, xdm, wdm
and apt-get install rungetty afterwards open /etc/inittab and modify this line 1:2345:respawn:/sbin/getty 38400 tty1 to
1:2345:respawn:/sbin/rungetty tty1 –autologin $user
Now edit and to your /home/$user/.bash_profile
if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then
while [ 1 == 1 ]
do
startx
sleep 10
done
fi
September 10th, 2007 at 5:17 pm
Reading a headline like this could made someone believe debian is more user friendly than ubuntu .. I think it is more appropriate to set the title to:
How stupid should I be to make a machine start directly in X .. especially in debian ?
“The correct way to disable a service (such as GDM) from being started in a given runlevel (e.g., 2 which is Debian’s default runlevel) is like so:
mv /etc/rc2.d/S30gdm /etc/rc2.d/K70gdm
Further information can be found in /etc/rc2.d/README.”
Is it ? May be you should consult the manual page of update-rc.d ..
$ ls /etc | grep “^rc”
rc.local
$
How about /etc/rc2.d not existing at all ?
sysv-rc sucks the big time ..
If you want the states to be preserved you should replace sysv-rc with file-rc . Something everyone should do.
Just my 2 BOFH cents ..
September 24th, 2007 at 5:00 pm
mv /etc/rc2.d/S30gdm /etc/rc2.d/K70gdm
Yep, Sam Morris’s su easy edit works like a charm every time.
Also goes great together with the other ?dm’s kdm and xdm
October 24th, 2008 at 12:08 pm
nice. very helpful
September 7th, 2009 at 6:35 pm
Why not just:
apt-get remove gdm
???
Then it is gone for good!
January 12th, 2010 at 8:10 pm
Why not just:
apt-get remove gdm
???
Then it is gone for good!
Sorry, I’m probably just some newbie speaking bad english, but everytime I remove Gnome, GDM or even just Epiphany, Debian tells me that a huuuuuuuuge amount of programs aren’t needed anymore.
And then, if I type
apt-get autoremove, Debian starts removing every GUI component of the system.January 28th, 2010 at 11:43 am
Hi All, but really I’m confised reading all that post on this thread, was looking to only remove permanently the gui start-up from my Debian and get a lot of misleading information. Even after trying
undate-rc.d gdm removeI get the following output:update-rc.d: /etc/init.d/gdm exist during rc.d purge (use -f to force)So what’s that?
Sure I have to reboot to see what happen after my first attempt to get gui startup out.
Maybe after someone will give a short and clear statement to this post, other can really get usefully info.
Thanks
February 9th, 2010 at 5:28 pm
I tried to run “update-rc.d -f gdm remove” as root but didn’t have any effect, on a fresh installation of Ubuntu 9.10 64 bit: the computer still boot in graphical mode.
February 18th, 2010 at 4:59 pm
Marco: I had exactly the same thing. For now, I’ll just deal with it and leave it eating up resources while it shouldn’t…
February 19th, 2010 at 2:10 pm
CrazyA, I solved it.
You need to open the /etc/default/grub file, locate the following line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"and change it to:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash text"and don’t forget to run ‘update-grub’ afterwards to update.
February 22nd, 2010 at 5:16 pm
Marco: Thank you very much. I finaly got back home so I could try it, and it works like a charm!
June 6th, 2010 at 2:42 am
I had the same trouble as you marco. I’ve removed gdm like it’s said here but at reboot … still gnome launched -.-
thank you marco for the solution
this topic should be updated by admin ^^