LinuxQuestions.org
Review your favorite Linux distribution.
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 01-14-2006, 01:10 PM   #1
grautu
Member
 
Registered: Jul 2005
Posts: 142

Rep: Reputation: 15
To customize an X free runlevel


Hi!
My Debian "Sarge" box is now running with X and KDE irrespective of runlevel 2...5. I'm aiming to customize runlevel 2 so as to disable KDE and X at boot time. Could anybody please give me a list of Linux services which I must stop to this end? Disparate examples of such services are also very much appreciated.
 
Old 01-14-2006, 01:35 PM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
I think runlevel 3 is for text-based (non-X) login? I might be wrong, though..but stopping KDM/GDM ought to stop quite much or any x-related stuff.
 
Old 01-14-2006, 02:10 PM   #3
saman007uk
Member
 
Registered: Dec 2003
Location: ~root
Distribution: Debian
Posts: 364

Rep: Reputation: 33
Just do (to sop a GUI from starting in any runlevel):
Code:
mv /etc/init.d/gdm /etc/init.d/gdm.backup
mv /etc/init.d/kdm /etc/init.d/kdm.backup
mv /etc/init.d/xdm /etc/init.d/xdm.backup
update-rc.d /etc/init.d/gdm remove
update-rc.d /etc/init.d/kdm remove
update-rc.d /etc/init.d/xdm remove
If you only wish to remvoe them from runlevel 2:
Code:
update-rc.d gdm stop 2
update-rc.d xdm stop 2
update-rc.d kdm stop 2

Last edited by saman007uk; 01-14-2006 at 02:14 PM.
 
Old 01-14-2006, 02:18 PM   #4
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by grautu
Hi!
My Debian "Sarge" box is now running with X and KDE irrespective of runlevel 2...5. I'm aiming to customize runlevel 2 so as to disable KDE and X at boot time. Could anybody please give me a list of Linux services which I must stop to this end? Disparate examples of such services are also very much appreciated.
No need to disable services just use rm /etc/rc2.d/S99kdm and you may have to remove the xdm or others if they are there as well.
 
Old 01-14-2006, 02:32 PM   #5
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
I had the same thing happen with Debian Sarge. My /etc/inittab specifies run level 3 as the default, which is text based console. However when I installed KDE the system started running a GUI on startup. It didn't change my inittab so I don't know exactly why this is happening. This is what I did in /etc/rc3.d to get back to text based console by default.

# ls -1
.
..
S10sysklogd
S11klogd
S20apmd
S20dirmngr
S20makedev
S20ssh
S89atd
S89cron
S90iptables
S99rmnologin
S99stop-bootlogd
disable.s14ppp
disable.s18portmap
disable.s20exim4
disable.s20inetd
disable.s20lpd
disable.s20xfs
disable.s21nfs-common
disable.s99kdm
disable.s99xdm

You can see that I just disabled a bunch of startup files. You can also see that non of them is labeled as starting a GUI. I figure that the GUI is started somewhere else in the boot scripts. This got the job done and it got rid of a bunch of services that I don't want running such as NFS. If you don't have a startup for iptables that's because I added that myself.

I hope this helps. I think that we both need to spend some time at the Debian web site and figure out the right way to get this done.

Last edited by stress_junkie; 01-14-2006 at 02:38 PM.
 
Old 01-14-2006, 02:51 PM   #6
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by stress_junkie
I had the same thing happen with Debian Sarge. My /etc/inittab specifies run level 3 as the default, which is text based console. However when I installed KDE the system started running a GUI on startup. It didn't change my inittab so I don't know exactly why this is happening.
When you install a display manager the Debian system assumes you want to use it thus it installs the links to start it on boot. You have to have changed the inittab Debian defaults to runlevel 2 I have never seen it do differently in the over 3 years I have been using it.

Quote:
This is what I did in /etc/rc3.d to get back to text based console by default.

# ls -1

disable.s99kdm
disable.s99xdm

You can also see that non of them is labeled as starting a GUI. I figure that the GUI is started somewhere else in the boot scripts.

I hope this helps. I think that we both need to spend some time at the Debian web site and figure out the right way to get this done.
Those two would start the KDE and X display managers. The right way to do it is remove either the kdm and xdm packages or the links to them in the runlevel you start in.
 
Old 01-14-2006, 05:36 PM   #7
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Happy Tux,

Thanks for the info.

I would have removed the xdm and kdm and other links that I didn't want to run in rc3.d but I like to be able to undo experments.

So you're saying that a system with Debian + GUI needs to boot to runlevel 2 for a text console? That's one thing about different distros. It seems like they all have some idiomatic and weird thing. I was just reading about Gentoo. Apparently there is an application to add startup services to your default run level. I forget what it is called but it is something like add2defaultrc <file in init.d>. And my most familiar distro, SuSE, is VERY idiomatic with its system configuration. It's frustrating, especially when you compare it to the simple model used by Solaris and other Unixes.

Last edited by stress_junkie; 01-14-2006 at 05:56 PM.
 
Old 01-14-2006, 06:09 PM   #8
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by stress_junkie
Happy Tux,

Thanks for the info.

I would have removed the xdm and kdm and other links that I didn't want to run in rc3.d but I like to be able to undo expermemts.
Renaming works just as well so it can be good to keep the old links for possible re-enabling.
Quote:
So you're saying that a system with Debian + GUI needs to boot to runlevel 2 for a text console?
No what I am saying is in any runlevel 2-5 on a Debian system they are configured identically when software installs startup links it gets installed in 2-5 with the default runlevel being 2 and when you install something that creates startup links it will be run on the next boot unless you disable the link. So there is no default console or X runlevel only different software installed, sys admin preferences.

Quote:
That's one thing about different distros. It seems like they all have some idiomatic and weird thing. I was just reading about Gentoo. Apparently there is an application to add startup services to your default run level. I forget what it is called but it is something like add2defaultrc <file in init.d>. And my most familiar distro, SuSE, is VERY idiomatic with its system configuration. It's frustrating, especially when you compare it to the simple model used by Solaris and other Unixes.
Yeah there is what 5 million distros with new ones be added every day each doing their own thing. To do the same in Debian as Gentoo you would use update-rc.d to manage your startup links.
 
Old 01-15-2006, 01:56 PM   #9
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 863

Rep: Reputation: 45
Have a look at Sys-V Level Editor (in the system part of the menu). You can edit the levels graphically.
 
  


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
What's the difference between runlevel 2 and runlevel 5 in Debian? davidas Linux - Newbie 2 01-05-2012 01:10 PM
customize isag RajRed Linux - General 0 11-29-2005 06:59 PM
customize bash kpachopoulos Linux - General 2 05-27-2005 02:50 PM
KDE customize laxesis Linux - General 3 05-27-2005 02:20 AM
X does not start in Runlevel 4, but i Runlevel 3 Rabon Linux - General 3 11-18-2003 06:24 AM

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

All times are GMT -5. The time now is 12:49 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