LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-15-2004, 12:11 AM   #1
tuxedo-notebook
Member
 
Registered: Oct 2003
Distribution: Gentoo 2.6.12, Mepis 2.6.7, KUbuntu PPC
Posts: 43

Rep: Reputation: 15
How do I turn off the graphical log-in?


I prefer logging in through the console. How do I turn off the graphical login that is default in Debain 3.x (sarge)? Thank you!
 
Old 04-15-2004, 12:18 AM   #2
spurious
Member
 
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558

Rep: Reputation: 31
Edit /etc/inittab and change the following:

# The default runlevel.
id:5:initdefault:

to:

# The default runlevel.
id:3:initdefault:
 
Old 04-15-2004, 04:58 AM   #3
Gnuru
Member
 
Registered: Jan 2004
Posts: 53

Rep: Reputation: 15
Quote:
Originally posted by spurious
Edit /etc/inittab and change the following:

# The default runlevel.
id:5:initdefault:

to:

# The default runlevel.
id:3:initdefault:
The default debian runlevel is 2. I remember a time when the default was 3 for X and 2 for console, but having just had a quick look through /etc/rcN.d, X is started in all of them except 0,1 (single user mode) and 6 (shutdown) - obviously.

The Debian-ish way to change what init scripts are run is to use the tools that Debian provides. To remove the X start-up from all run levels do this:

# update-rc.d xdm remove

To put everything back to its default do this:

# update-rc.d xdm defaults

To stop xdm running in, say run-level 2 do something like this:

# update-rc.d xdm stop 99 2

If you're then in a runlevel where X isn't working and you would like do it to temporarily. Do this:

# invoke-rc.d xdm start
 
Old 04-16-2004, 01:32 AM   #4
tuxedo-notebook
Member
 
Registered: Oct 2003
Distribution: Gentoo 2.6.12, Mepis 2.6.7, KUbuntu PPC
Posts: 43

Original Poster
Rep: Reputation: 15
Thank you!
 
Old 04-18-2004, 01:44 AM   #5
spurious
Member
 
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558

Rep: Reputation: 31
Thanks for the Debian way tips.
 
Old 04-03-2005, 12:55 PM   #6
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
I might be missing the point but:

Why is this so complicated in Debian. Today I ran into this issue myself. I wanted to do something while I was sure that X was not running. Not a ctrl-alt-F1 to get TTY1 or so. It simply is IMPOSSIBLE in Debian to quit X!

Telinit 3 doesn't do anything (or at least it does not shut down X), kill X doesn't work, it respawns immediately, kill kdm doesn't work, /etc/init.d/kdm doesn't work, and editing inittab doesn't work either. Debian does not respond to the latter because it starts in level 2 anyway and then does some magic in rcS.d and rcN.d to get to level 5 and start X.

Weird. I though it was Linux *POLICY* to be able to switch to text mode/runlevel without a hassle. Preventing this or requiring altering rc-something and reboot looks like Windows policy!

Can someone explain the benefits of this?

Otherwise Debian is a great distro, I run 3 workstations, 4 servers, a process controller and a laptop on Debian.

jlinkels
 
Old 04-03-2005, 01:50 PM   #7
angkor
Member
 
Registered: Mar 2005
Location: Amsterdam
Distribution: Debian => Ubuntu => Mac Osx
Posts: 165

Rep: Reputation: 31
what about:

/etc/init.d/kdm stop

?
 
Old 04-03-2005, 05:30 PM   #8
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Quote:
Originally posted by jlinkels

[...] /etc/init.d/kdm doesn't work, [...]
That is what I said. I used "stop".
 
Old 04-03-2005, 06:52 PM   #9
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 34
Quote:
Originally posted by jlinkels
I might be missing the point but:

Why is this so complicated in Debian....
I agree that it is more complicated than need be.....................Granted, I cut my Linux teeth on Slackware, which uses the simpler BSD style startup scripts instead of the more complicated Sys-V startup..........I like simple....

However, jlinkels, you should be able to kill the xserver by using it's "three-finger salute", which is Ctrl+Alt+Backspace.......

And the benefits of the Sys-V style, I'm still trying to find any.........
<EDIT> I also don't like the Debian way of populating ALL the rc?.d directories with links by all the daemon packages...........It doesn't allow for any fine-grained control of the startup routine.....
</EDIT>

FYI - As for the traditional runlevels, 2 was for running in text mode without any networking, 3 was for text mode _with_ networking, and 5 was for the gui mode............I forgot where I read this bit of trivia from.....

Last edited by thegeekster; 04-03-2005 at 07:02 PM.
 
Old 04-04-2005, 08:16 AM   #10
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Quote:
Originally posted by thegeekster


However, jlinkels, you should be able to kill the xserver by using it's "three-finger salute", which is Ctrl+Alt+Backspace.......

I know the "three finger salute" (reminds me of...), but X restarts immediately. Same as with killing X from TTY1. It respawns. (reminds me of...)

Contrary to you, I do like the rcN.d mechanism of Debian. I grew up with RH, but I found it easy to adapt to Debian, and even straightforward.

However, what bugs me, is that this behavior is not really in line with that mechanism. If it were, you would be able to switch to level 3, and X would be killed by those famous scripts. It makes me feel like I am not fully in control of my computer anymore. (reminds me of...)

If you do not install X-windows-system, Debian starts up in level 3, no problem.

jlinkels
 
Old 04-04-2005, 08:45 AM   #11
prasanta
Member
 
Registered: Mar 2005
Location: India
Distribution: Debian
Posts: 368

Rep: Reputation: 37
But /etc/init.d/gdm stop is working fine with me. X Server stops properly without any complains.

even, init 1 also stops X properly. By putting S* and K* scripts in proper directories, this thing can be done.
 
Old 04-04-2005, 09:53 AM   #12
Tons of Fun
Member
 
Registered: Dec 2004
Location: Orlando, Florida
Distribution: Debian 10 | Kali Linux | Ubuntu 20.04 LTS
Posts: 382

Rep: Reputation: 37
I had the same problem. All I did was "apt-get remove gdm". When I rebooted, It went to the console rather than the graphical interface. If I want to go to the graphical interface (gnome in my case), I just type "start x". When I logout, it takes me back to the console. Now it works just like I want it to.

Tons of Fun
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
log in to root in graphical-suse 9.1 master SUSE / openSUSE 7 05-19-2005 11:50 AM
How to turn on log for tty device yan Linux - General 0 12-08-2003 04:52 PM
can't log in graphical environment abd_bela Debian 3 09-12-2003 07:43 AM
Graphical log-in KDE instead of Gnome Bjorne Linux - General 27 07-15-2003 07:38 PM
Adding other Desktops to Graphical Log in kabads Linux - General 3 10-10-2002 06:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration