[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: Stopping GNOME Launching on Reboot



On Thursday, March 18, 2004 12:12 PM, Richard Hoskins wrote:

> "s. keeling" <keeling@spots.ab.ca> writes:
>> Incoming from Roland Dunn:
>>> 
>>> Having typed: "update-alternatives --config x-session-manager" and
>>> choosen GNOME, GNOME now starts up on reboot. I'd like it not to so that
>>> I can type "startx" when I want it to go into GNOME. How can I force it
>>> not to launch GNOME on reboot?
>>
>> That's gdm, and you can disable it by [as root]:
>>
>>   1. /etc/init.d/gdm stop
>>
>>   2. edit /etc/init.d/gdm.  Stick an "exit 0" near the top of it.
>>
>> Note you should do it in that order.  The second step disables the
>> first.  And from now on, X desktop changes go in ~/.xsession
>
> Wouldn't it be better to change the symlink in /etc/rc2.d?  (Assuming
> the OP is booting into runlevel 2.)
>
> I think this is better for several reasons.  It preserves init.d/gdm
> in case he wants to start|stop|restart gdm from the command line, it
> allows for running gdm in a different runlevel, and it doesn't depend
> on init.d/gdm running at all when booting in to runlevel 2.  In
> addition, it is consistent with the way System V init is commonly
> used, and documented.
> 
> 'mv /etc/rc2.d/Snngdm /etc/rc2.d/Knngdm', as root.
> 
> I guess it doesn't really matter if all he wants to do is nuke gdm,
> but if he wants to make a lot of changes to his init, mucking around
> in the scripts would quickly become a mess.  I'd hate to have to take
> over maintenance of a machine from somebody who did that.
> 
> http://www.freeos.com/articles/3243/ is a good overview of System V
> init.

Exactly.  If the intention is to simply stop gdm from running automatically,
it is best to update rc.d, this way it preserves the gdm init script so that
it runs properly when run manually from the command line.  By running:

update-rc.d -f gdm remove

We take gdm out of rc.d and prevent it from running at all run levels and
the user, if he/she wishes, can still run gdm from /etc/init.d/gdm
start/stop/etc and it will still work properly.  Scripts can still be run,
just not at startup.

Michael



Reply to: