Re: Q re missing rc.local file

From: Bob Proulx (bob_at_proulx.com)
Date: 08/05/05

  • Next message: Kevin Coyner: "pbuilder create error"
    Date: Fri, 5 Aug 2005 09:03:58 -0600
    To: debian-user@lists.debian.org
    
    
    

    Gene Heskett wrote:
    > Bob Proulx wrote:
    > > On Debian there is no difference (by default) to the different run
    > > levels. This is an often confusing point to people switching to
    > > Debian. And the converse that run levels are meaningful to people
    > > switching to Red Hat.
    >
    > Yes, among other things if its setup for a graphical login, but I want
    > to first do a text login followed by a startx. How then is this
    > accomplished?

    Do you want to configure the machine for a text login? (And then run
    startx or xinit or whatever to start X on demand.) If you are never
    going to log in with X then:

      apt-get remove gdm kdm xdm

    If you are asking how you can do this for a single login session then
    I use cntrl-alt-F1 to switch to a text console. There are several
    virtual consoles configured by default. I often use the text consoles
    for various reasons. Alternatively the graphical login managers also
    have a button to login on the text console.

    If you really want the graphical login to be runlevel dependent then
    simply configure the system to be runlevel dependent. You can do this
    either of two ways. Use one of the management programs sysvconfig,
    rcconf, or sysv-rc-conf mentioned previously. Or just move the
    symlink yourself manually. Your manual changes will be recognized and
    preserved by update-rc.d on future package upgrades.

      cd /etc/rc3.d
      mv S99kdm K99kdm
      mv S99gdm K99gdm

    Are you aware of how ~/.xsession may be used for your own personal
    customization of the X11 startup? In fact you will almost certainly
    want it so that you can load your ~/.bash_profile and ~/.bashrc files.
    I am guessing that it might help you do whatever it is that you are
    asking about here.

    > >There is no default "local" rc script. Which is perhaps a shame
    > >because this is an often asked question. But there is a template
    > > that you can use to easily create one for yourself.
    > >
    > > cd /etc/init.d
    > > cp skeleton localrc
    > > editor localrc # edit as you desire
    >
    > Ahh, that I can handle. I take it it gets sourced if it exists as
    > localrc?

    It gets sourced because it has a symlink to it (created with
    update-rc.d in my example) which points to it from rc2.d. I only
    called it localrc here in the example. I almost called it
    "mypersonallocalrc" for emphasis and perhaps should have. Or perhaps
    I should have called it exactly "rc.local" as in your previous system.
    The name really does not matter. I was just typing in names fast and
    furiously. I should have called it rc.local to match your previous
    name.

    > >In any case, there is a tool to set up the symlinks that can be
    > >thought of as a chkconfig like tool.
    > >
    > > update-rc.d localrc defaults
    > >
    > > This is really a scripting interface. So normally users don't need
    > > to know about the command. But it is used in packages in the
    > > postinst script. And the reverse removal is 'update-rc.d localrc
    > > remove'.
    >
    > But, what do I do it aI want to remove boinc, but not setibatch?
    > Obviously we're back to hand editing. I'm capable of that.

    You have lost me. I know "setibatch" is how you are starting the seti
    tools. You did not mention "boinc" previously but I will assume it is
    another thing you want run at startup. Given that, I don't understand
    your question at all. If you put it in then you can take it out,
    right?

    I am starting out with the scene you had set that you had created an
    rc.local on your previous system and wanted to transfer that local rc
    startup to your Debian system. In that case pretty much anything you
    did in the old rc.local you would do on your new system too. If you
    started both of those in rc.local then you could start both of those
    in one script now too. If you want to create individual scripts one
    for each of those then that is fine too. Because your comment loses
    me I would need more input to suggest more.

    > Maybe a different tack needs to be taken by way of having an etc/local
    > dir, and anything placed it it gets sourced at startup? Is something
    > like that possible in the future?

    You can easily create this yourself. See the run-parts command for a
    useful utility in this process. You could package up a generic
    startup interface and submit it to the community. Others might find
    that useful too.

      man run-parts

    But pretty soon you will find that ordering is a problem. So you
    would probably create a directory that contains the real scripts and a
    second directory that contains symlinks to those scripts. The name of
    the symlink could contain a number to force a startup ordering
    independent of the underlying name. If you notice I have just
    proposed that the logical conclusion of doing this is that we would
    have exactly the same system that we already have with the /etc/init.d
    and /etc/rc*.d directories! :-)

    [Of course the Gentoo folks have a different startup system with
    declared dependencies and an automatic ordering that they like. And
    there are parties in Debian proposing similar things too. Personally
    I like the current system best. But choices are good.]

    Bob

    
    

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    


  • Next message: Kevin Coyner: "pbuilder create error"