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 have installed Debian wheezy on my machine with a netinst image, now I would like to deactivate the desktop and boot straight to the command line, not only that but I would like to not waste any resource on the X11/gnome/gdm at all if not needed.

I tried ( as root )

update-rc.d -f gdm remove
update-rc.d -f gdm3 remove
update-rc.d -f wdm remove

but Debian keeps booting into the login manager, I really don't need that, how I can deactivate this kind of boot and start X only when needed ?

share|improve this question
up vote 12 down vote accepted

Look in /etc/rc2.d/. There are probably links to /etc/init.d/xdm and /etc/init.d/kdm which you haven't removed yet.

You can also edit the file /etc/X11/default-display-manager, which includes the full path to the default display manager Debian is using. If you replace the content of that file with /bin/true, you are probably disabling the start of any login-manager as well.

The TTYs are spawned anyways. If no login-manager is launched, TTY1 will remain the active TTY and you can just log in using the command line.

share|improve this answer
    
I'm sure i have no xfce or kde-related package installed because I just installed the "default" gnome desktop environment, I will go for /etc/X11/default-display-manager and see if this solves. – user2485710 Aug 14 '13 at 17:22
    
A quick ls /etc/rc2.d/ would provide proof. I'm sure you have no idea what packages you never wanted have been installed. You're using Debian, not Gentoo. :-) – Bananguin Aug 14 '13 at 17:28
1  
I commented out with a # the line inside /etc/X11/default-display-manager and added a new one with /bin/true and now it boots into a tty, or, in better terms, it doesn't boot any display manager, just like I wanted. Debian is my choice at the moment because of the really low requirements and the pre-compiled packages in the repository, I'm running it under an 800Mhz single core CPU with 128Mb of ram, to run Gentoo under this system you will need ages; but Debian is perfectly fine for now. – user2485710 Aug 14 '13 at 17:40

For Debian 8 with systemctl:

systemctl disable gdm
share|improve this answer

Actually for those who come across this looking how to disable login screen user list in Jessie the above comment about Debian 8 is incorrect at least as of today. To disable this in Debian 8 Jessie do the following:

$ sudo nano /etc/gdm3/greeter.dconf-defaults

With the file open remove the # in front of the disable-user-list=true line as shown in the file sample below.

# Login manager options
#======================
[org/gnome/login-screen]
logo='/usr/share/icons/gnome/48x48/places/debian-swirl.png'
fallback-logo='/usr/share/icons/gnome/48x48/places/debian-swirl.png'

# - Disable user list
# disable-user-list=true
# - Disable restart buttons
# disable-restart-buttons=true
# - Show a login welcome message
# banner-message-enable=true
# banner-message-text='Welcome'    

After changing press 'CTRL+X' then 'Y' and press ENTER to save the changes.

After you save the file run the following command to restart GDM and you will be prompted for your login.

$ sudo systemctl restart gdm3.service
share|improve this answer

Your Answer

 
discard

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.