LinuxQuestions.org
Help answer threads with 0 replies.
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 07-18-2006, 01:08 PM   #1
PaulyWally
Member
 
Registered: Jun 2006
Distribution: Ubuntu
Posts: 31

Rep: Reputation: 15
Newbie Question - Sarge's Startup Script?


I installed 3.1 r2 with desktop and Apache. I don't want X to start at bootup. I would prefer to get the original text-based Linux login, and be able to do a StartX from the console.

I searched the board and newsgroups and couldn't really find anything that helped.

Thanks in advance!
 
Old 07-18-2006, 01:51 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
I believe what you want to do is use update-rc.d to remove starting x from rc2.d (runlevel 2 is the default runlevel for Debian). I would give you the exact command to type, but I've not used the command in quite some time...
 
Old 07-18-2006, 01:57 PM   #3
PaulyWally
Member
 
Registered: Jun 2006
Distribution: Ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pljvaldez
I believe what you want to do is use update-rc.d to remove starting x from rc2.d (runlevel 2 is the default runlevel for Debian). I would give you the exact command to type, but I've not used the command in quite some time...
There wouldn't be much of a point to me learning Debian if you held my hand.

Between that and some other stuff I've been poking at, we'll see what I can do (or mess up).

Thanks!
 
Old 07-18-2006, 02:27 PM   #4
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
view inittab, by the way.. Maybe it's easier to make 3 default runlevel?
 
Old 07-18-2006, 03:12 PM   #5
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Quote:
Originally Posted by raskin
view inittab, by the way.. Maybe it's easier to make 3 default runlevel?
In Debian, runlevels 2-5 are the same by default.
 
Old 07-18-2006, 03:18 PM   #6
PaulyWally
Member
 
Registered: Jun 2006
Distribution: Ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by raskin
Maybe it's easier to make 3 default runlevel?
Tried that. It no workey.

I found something in a newsgroup and ended up adding a

Code:
exit 0
to the very beginning of the /etc/init.d/gdm file. Even better cause now I can choose either the Desktop Manager (by typing "gdm"), or my default X (by typing "startx") from the command line.

Last edited by PaulyWally; 07-18-2006 at 03:19 PM.
 
Old 07-18-2006, 03:32 PM   #7
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
You could do the same with removing link with name matching S*gdm in /etc/rc.d/rc<runlevel>.d . By exit 0 you just tell the script to stop. I didn't know Debian doesn't make difference for runlevels by default... I thought better of Debian (X running from initscript at runlevel 3 is not my favorite setup).
 
Old 07-18-2006, 04:09 PM   #8
PaulyWally
Member
 
Registered: Jun 2006
Distribution: Ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by raskin
You could do the same with removing link with name matching S*gdm in /etc/rc.d/rc<runlevel>.d.
I tried that too. As a newbie, I could be wrong. So please feel free to correct me. But here is what I gathered:

There is no /etc/rc.d/ directory (anymore?). Debian Sarge uses a set of directories /etc/rc<n runlevel>.d. So, under /etc/ you will find directories:

./rc0.d/
./rc1.d/
./rc2.d/
./rc3.d/
./rc4.d/
./rc5.d/
./rc6.d/
./rcS.d/

(At least, that's exactly how my system looks).

Within those directories appear to be a seperate set of scripts. I have a base install with Xwindows and Apache. My rc2.d directory has 19 files in it. One of them is called, "S91apache2", and I assume that initializes the Apache HTTP server upon bootup. If I look at the contents of that file, one of the very first comments is:

Code:
# This init.d script is used to start Apache2
I searched all these scripts looking for gdm and couldn't find it. So I don't know how Debian is starting the desktop manager at bootup.

Last edited by PaulyWally; 07-18-2006 at 04:12 PM.
 
Old 07-18-2006, 04:28 PM   #9
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Look rcS.d also.
 
Old 07-18-2006, 04:35 PM   #10
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
In my sarge install, the gdm symlink is /etc/rc2.d/S99gdm and it links to /etc/init.d/gdm

Note that if you installed a different desktop than Gnome, it might be S##kdm or S##xdm.
 
Old 07-18-2006, 04:38 PM   #11
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Okay, I found a tool that might be helpful for you, aptitude install sysv-rc-conf. It's an ncurses based interface that lets you use the space bar to set things to run in the different runlevels...
 
Old 07-18-2006, 04:46 PM   #12
PaulyWally
Member
 
Registered: Jun 2006
Distribution: Ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pljvaldez
In my sarge install, the gdm symlink is /etc/rc2.d/S99gdm and it links to /etc/init.d/gdm

Note that if you installed a different desktop than Gnome, it might be S##kdm or S##xdm.
My bad... you're right... all those files in the /rcn.d/ directories are symlinks... not scripts.

Either way... the "S99gdm" symlink points to /etc/init.d/gdm.... the file that I modified to keep Gnome Desktop Manager from starting upon boot.
 
Old 07-18-2006, 04:55 PM   #13
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Your script change sounds fine for what you're doing. But now if you wanted to have a default runlevel that did boot into x automagically, you couldn't have it because the change you made would affect all of the multiuser runlevels.

There's always more than 10 ways to skin a cat, but if you're going to be a system admin, you should probably try to do things in a standard way in the event someone else has to admin the system later on... Just my
 
Old 07-19-2006, 10:22 PM   #14
PaulyWally
Member
 
Registered: Jun 2006
Distribution: Ubuntu
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pljvaldez
but if you're going to be a system admin, you should probably try to do things in a standard way
Good point. Although I'm not planning on becoming a Linux sysadmin... I do like to keep things scaleable. Plus, I work on Winblows systems now. Who knows what systems I might end up on in the future.

At any rate... I've only dabbled in Linux before (Red Hat, and I didn't like it). I'm really trying to get my hands dirty now. So I might as well learn the 10 different ways to skin the cat so I know which is best for different applications.

Thanks all!
 
  


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
newbie script question mngmd Linux - Newbie 5 12-17-2005 04:44 AM
newbie - how to create a startup script gogogadgetearl Linux - Software 2 10-02-2005 08:14 PM
startup script question flyingcowofdoom Fedora 1 05-14-2005 09:25 AM
Gentoo startup script question SciYro Linux - Distributions 2 08-14-2004 04:36 AM
startup script question estiers Linux - Software 1 12-29-2003 08:55 PM

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

All times are GMT -5. The time now is 04:52 PM.

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