running scripts before x-server starts

Lev Lafayette lev at ivt.com.au
Tue Jul 31 00:45:20 UTC 2007


On Mon, 2007-07-30 at 20:25 -0400, Matt Morgan wrote:
> On 7/30/07, Matt Morgan <minxmertzmomo at gmail.com> wrote:
> > On 7/30/07, Naja Melan <najamelan at gmail.com> wrote:
> > > hi,
> > >
> > > im looking for a way to run a script, depending on which option in grub i
> > > choose to run a script before xserver starts. Basically to be able to choose
> > > between multiple xorg.conf files.
> > >
> > > Anyone knows if it can be done?
> > >
> > > cheers
> > > naja
> > >
> > > --
> > > ubuntu-users mailing list
> > > ubuntu-users at lists.ubuntu.com
> > > Modify settings or unsubscribe at:
> > > https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> > >
> > >
> >
> > /etc/rc.local
> >
> 
> oops, I think I'm wrong about that. It runs after x starts up. Wrote
> before I thought.
> 

MBR, GRUB, Kernel, inittab, init.d. and rcS which calls S??* scripts
in /etc/rcS.d/ in numerical/alphabetical order

So modifiy the /etc/rcX.d you want (the 'X' represent runlevels). In
each directory there is files like SXXservice and KXXservice. The S
files represent startup files and the K files represent the kill files. 

The XX number in those files represent the order in which those files
are started or killed. 

Simply change the number higher or lower to move the service around in
startup or shutdown.

Hope this helps,

-- 
Lev Lafayette 
Internet Vision Technologies
Level 1, 520 Dorset Road Croydon, VIC 3136
Ph: +61 3 9723 9399




More information about the ubuntu-users mailing list