LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-10-2005, 09:42 AM   #1
DeadlySin3
LQ Newbie
 
Registered: May 2003
Location: Co
Distribution: Debian 3.0r2.Sarge
Posts: 25

Rep: Reputation: 15
Preventing X from starting automatically


I am wondering how to prevent X-windows from starting up when I boot my system. I'm running Debian Sarge with gnome, if that makes a difference.

I've read that editing the /etc/inittab file and changing the run level (which by default was 2 for me, not 3) to 3 would prevent x from starting automatically. I logged out of X and back in, still had X starting automatically.

Also, i've read that renaming the /etc/rc2.d/S99xdm symlink (might be kdm or gdm or some other alternative as well) should do the trick, though it didn't.

When I first installed the x window system, X wouldn't start automatically, I had to type "startx" at the prompt in order to get it going and I would prefer to have it that way again.

Anyone have a tip or two on how this can be done?

Thanks,

-Paul

Last edited by DeadlySin3; 04-10-2005 at 10:10 AM.
 
Old 04-10-2005, 11:48 AM   #2
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
The inittab edit should do the trick. Did you reboot after doing the edit?
 
Old 04-10-2005, 08:52 PM   #3
DeadlySin3
LQ Newbie
 
Registered: May 2003
Location: Co
Distribution: Debian 3.0r2.Sarge
Posts: 25

Original Poster
Rep: Reputation: 15
Yes, after I edited the inittab - I rebooted my machine and much to my dismay, xdm was the very last thing to load.
 
Old 04-10-2005, 09:25 PM   #4
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
Runlevel 3 is supposedd to be the console log in. You may want to open the /etc/init.d/rc.4 file in an editor and take a look at just what it's scripting looks like. You may have to comment out some line calling up the X server that shouldn't be there.
 
Old 04-10-2005, 11:09 PM   #5
DeadlySin3
LQ Newbie
 
Registered: May 2003
Location: Co
Distribution: Debian 3.0r2.Sarge
Posts: 25

Original Poster
Rep: Reputation: 15
I appreciate your time and help with this matter.

I've read and re-read that the run level in the /etc/inittab file is what's supposed to control whether you manually start x or have it automatically start for you.

I'm very confused as i've gone through the steps on the debian.org website in the how-to's section regarding the x window system and still I cannot stop X from starting up automatically.

I've opened up /etc/init.d/rc.4 using JOE as root and JOE created a new file, telling me that /etc/init.d/rc.4 doesn't exist. So i'm a bit lost as to what the problem could be.

Here is the first few lines in my /etc/inittab file
Code:
# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $

# The default runlevel.
id:3:initdefault:

# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS

# What to do in single-user mode.
~~:S:wait:/sbin/sulogin

# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.
Aside from that, after rebooting and having X still fire up, I took the liberty to again rename this symlink: /etc/rc2.d/S99xdm

Now it's called /etc/rc2.d/not.S99xdm

which hides the symlink for some reason. I rebooted after that and again, X was the last thing to start. This is turning out to be frustrating! haha. Everything i've read so far poitns to the /etc/inittab file and the runlevel, including the official website's documents.

Either i'm doing something terribly wrong or something was drastically changed in my system the last time I ran apt-get dist-upgrade that I don't know about.

I'm running out of ideas and things to read on this matter. Any and all help, as always is greatly appreciated!

Thanks,

-Paul
 
Old 04-11-2005, 03:04 AM   #6
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Debian always runs in runlevel two and does not follow the same runlevel system as other distros. To prevent GDM from starting, either remove gdm, reconfigure the system using dpkg-reconfigure so that gdm is disabled at boot time (sorry I don't know the exact procedure and syntax). "/etc/init.d/gdm stop" kills gdm and gives you a working envioment thats similar to init 3 and running "/etc/init.d/gdm" start puts you back into the gui login ust like init 5. Note that you are always in runlevel two whether or not gdm is running.

Last edited by reddazz; 04-11-2005 at 08:11 AM.
 
Old 04-11-2005, 05:26 AM   #7
DeadlySin3
LQ Newbie
 
Registered: May 2003
Location: Co
Distribution: Debian 3.0r2.Sarge
Posts: 25

Original Poster
Rep: Reputation: 15
Yes, I went into a #debian room on freenode, and was told the exact same thing. Thanks for the help and your time.
 
  


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
starting Apache automatically nodger Linux - Software 2 11-04-2005 03:54 PM
not starting automatically ??? JNaas Linux - Networking 0 09-30-2004 07:25 PM
Starting KDE automatically Sinope Linux - Newbie 2 08-13-2004 09:56 AM
Automatically starting Kppp Gomi Linux - Newbie 1 05-18-2004 08:33 PM
Starting X Automatically shari Linux - Software 2 08-08-2001 01:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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