LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Unable to disable X from loading at statup (https://www.linuxquestions.org/questions/linux-software-2/unable-to-disable-x-from-loading-at-statup-91025/)

morrolan 09-09-2003 06:29 PM

Unable to disable X from loading at statup
 
Hi, I'm quite new to Linux, got so annoyed at microsoft that I'm now exploring alternatives.

I want Debian to boot to the command line, but each time the machine is powered up, it goes straight to Debain's X login screen, and from there into KDE.

I've been working on this for days, I've read what I can find on google, :study: I've changed the default runlevel in inittab to 3 (everywhere says change it from 5 to 3, my default was 2 :confused:, but each time the system is turned on, it loads into the GUI.

I've looked at the Xsession file (didn't understand much), but I don't know what processes run or where the programs to launch at startup are listed.

:(

Is there such a thing as a "startup" script, which lists what to run and in what order at boot?

jailbait 09-09-2003 07:03 PM

"(everywhere says change it from 5 to 3"

Debian is the oddball. It uses a different runlevel scheme from the other distributions. 2 was probably GUI and I would guess that 1 is command line in Debian. Anyway look in the comments in /etc/inittab to see if you can figure out what Debian does with runlevels.

"Is there such a thing as a "startup" script, which lists what to run and in what order at boot?"

There are several large sets of startup scripts located in /etc/init.d
The runlevel setting determines which set of startup scripts are run.
You can also edit and change the startup scripts any way that you want.

morrolan 09-09-2003 07:29 PM

0 is listed as halt
1 single-user
2-5 multiple users
6 is reboot

Where can I find definitions of what each runlevel consists of?

:newbie:

wr3ck3d 09-09-2003 08:02 PM

I dont use debian. Found this though. Not sure if is correct so be careful :)

Quote:

Q: How can I make debian not boot into X?
A: First of all, the answer is *not* changing your default runlevel
like in RedHat, Debian uses a different approach and configures
runlevels differently, i.e. it makes by default no difference between
the multi-user runlevels 2 [default runlevel], 3, 4 and 5 and lets
the system administrator customize them. Read
http://www.debian.org/doc/debian-pol...sys#s-sysvinit for more
informations. Your graphical login thing, called a 'display manager'
is started like any other service with a script in /etc/init.d/ and a
symlink pointing to that in /etc/rc?.d/. If you want to get rid of it,
you have two possibilities:
1) remove the offending package, most likely one from xdm, kdm, wdm,
gdm or login.app (note: you can have more than one installed, but only
one is used by default). If your system wants to remove the packages
x-window-system, kde or gnome, dont't worry, they are only useful for
installation and not needed afterwards.
2) remove the symlink from one or all of the runlevels. This can be
solved with Debian's update-rc.d command (e.g. update-rc.d -f xdm remove).
This will remove xdm from all multi-user runlevels. You can also
use rm to delele the symlink in your default runlevel, but not in the
others in order to be able to boot into a 'X runlevel' and a 'non-X
runlevel', like RedHat does it.

jailbait 09-09-2003 08:28 PM

Halt means stop the computer
reboot means reboot the computer

single user mode means run with only one user, i.e. like the old DOS system

According to this link Debian sets runlevels 2-5 to be exactly the same:
http://www.togaware.com/linux/survivor/Other_Run.html

This baffles me as no other distribution is set up like this.

On Debian the run level number is used to start the script:
/etc/init.d/rcS#

So setting the runlevel to 3 will run script /etc/init.d/rcS3

That's all I can tell you. So either we need a Debian expert in here to help on this question or you could follow the scripts /etc/init.d/rcS# and see what they do.

If they are truly all the same then you could borrow one and set up your own private startup script to experiment with.

morrolan 09-09-2003 08:48 PM

wr3ck3d,
that worked wonders, I ran "update-rc.d -f xdm remove" as root, and rebooted - voila! Booted straight to the command prompt. Next thing, it tried to boot into gdm, so I removed that too. :D

Thanks very much.


"There is no substitute for good manners - except fast reflexes."

morrolan 09-09-2003 08:55 PM

Jailbait, that link you gave http://www.togaware.com/linux/survivor/Other_Run.html is the more surgical removal approach.

quote:
To stop xdm, for example, from starting up by default on boot, simply remove the symbolic link of the corresponding `S' script from /etc/rc?.d/S*xdm.

it goes into detail about removing the xdm entry in the particular run level script, rather than the kitchen-knife approach (which works great nonetheless) as used by "update-rc.d -f xdm remove".

Thanks again for the help guys!


All times are GMT -5. The time now is 12:56 PM.