Disabling graphical login in Debian wheezy

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 ?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

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.

Method 2

For Debian 8 with systemctl:

systemctl disable gdm

Method 3

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


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x