Add Comment

You are not currently logged in. If you do not have a user account then please consider creating one and logging in before you post your comment. This will allow you to track replies to your comment, and take part in the site much more freely.

To add your comment, fill in all the boxes below and then preview it to make sure you're happy with the way that it looks.

This is the comment you were replying to, attached to the article An introduction to run-levels:


Re: An introduction to run-levels
Posted by Anonymous (203.132.xx.xx) on Wed 9 Nov 2005 at 21:23

First of all, you want to find out what is starting X11 on your system. Most likely it's a display manager like xdm, kdm or gdm. When you first boot up, look at the welcome screen and you should be able to tell if its kdm (KDE), gdm (Gnome), or xdm (X11).

To make sure you chose the correct display manager, run this command:

cat /etc/X11/default-display-manager
Mine says "/usr/bin/kdm". Yours could be different. (You can edit /etc/X11/default-display-manager to change the display manager if you want to.)

So run commands like this:

ls -la /etc/rc*d/*kdm*
ls -la /etc/rc*d/*gdm*
ls -la /etc/rc*d/*xdm*

That will produce results something like this. I'm looking at kdm here, because that's the one I'm using.

lrwxrwxrwx  1 root root 13 Feb 14  2005 /etc/rc0.d/K01kdm -> ../init.d/kdm
lrwxrwxrwx  1 root root 13 Feb 14  2005 /etc/rc1.d/K01kdm -> ../init.d/kdm
lrwxrwxrwx  1 root root 13 Feb 14  2005 /etc/rc2.d/S99kdm -> ../init.d/kdm
lrwxrwxrwx  1 root root 13 Feb 14  2005 /etc/rc3.d/S99kdm -> ../init.d/kdm
lrwxrwxrwx  1 root root 13 Feb 14  2005 /etc/rc4.d/S99kdm -> ../init.d/kdm
lrwxrwxrwx  1 root root 13 Feb 14  2005 /etc/rc5.d/S99kdm -> ../init.d/kdm
lrwxrwxrwx  1 root root 13 Feb 14  2005 /etc/rc6.d/K01kdm -> ../init.d/kdm

Now what this means is that kdm starts in runlevels 2, 3, 4, and 5. kdm is stopped in runlevels 0, 1, and 6. If you want runlevel 3 to be text only in your system, you should be able to simply change the link for runlevel 3 for your display manager from start (S) to kill (K). So for example you could try this:

  mv /etc/rc3.d/S99kdm /etc/rc3.d/K01kdm

Then use the telinit command to change to runlevel 3:

   telinit 3

If you wanted runlevel 3 to be the default, then you need to edit /etc/inittab.

# The default runlevel.
id:2:initdefault:
You'd change the '2' to a '3'. Next time you reboot, your system will start in runlevel 3. There will be no display manager running in runlevel 3, because you turned it off. Therefore, runlevel 3 will become text only, and it will be the default. If that's what you want to do.


Username:Anonymous
Title:
Your Comment:

Posting Format:

 

Inappropriate comments will be removed.

Some help on entry formatting is available

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search