On Mon, 1 Oct 2007 21:49:19 +0100
Thomas Adam <[EMAIL PROTECTED]> wrote:

> On Mon, Oct 01, 2007 at 10:41:56PM +0200, Jes?s Guerrero wrote:
> > I don't know where this came from, but this .xinitrc is utterly
> > useless.
> 
> It's not that useless.
>  
> > As someone said, you are putting icewm, not fvwm in here. I can't figure
> > how do you expect fvwm to start ok.
> > 
> > But there are bigger flaws in that script. To start with, you should be
> > using '&' at the end of each command. Otherwise, the server will just
> > wait until that process has ended to start the following. 
> 
> Well, in the example .xinitrc script supplied, the source command is a
> builtin, so no backgrounding needed at all, and the last command was the WM
> (not FVWM, but...) which doesn't necessarily need an exec at all, it's just
> polite.  (And it would be an exec, rather than backgrounding it -- you want
> to kick the patent shell out of the way entirely).  
>
Yes, it is an exec in the last line. I know. Maybe I did not express to clearly,
but for my comments below that part I think it was clear enough. And ampersand 
in the end of that line would cause X to immediately exit.

> > But there is an even bigger flaw: you are using exec at the very
> > beginning of the script. When you call something with 'exec', you
> > tell the parent shell to close itself, and completely transfer the
> > control to the new process you are launching (as far as I know). So,
> > anything below the exec line, is, virtually, nonexistent.
> 
> You do if you have a *calling* program.  In this example, it's perfectly
> valid, you're just explicitly redirecting both STDERR and STDOUT (in this
> instance) to the named file for each process which generates any -- in this
> case, that process would be icewm.

I already commented about that in another mail. My fault.

> > Also, and this is one thing I really can't figure out: why the heck
> > are you sourcing your bashrc file from xinitrc???
> 
> So that the environemnt is inherited when the WM is launched.

I know what that does, I don't know _why_.

As far as I know, all the variables are already inherited from your
current bash session anyway. If you are in a login session, bashrc is not
sourced, but bash_profile is. It might make some sense to put them there.
And if it is something specific for X or fvwm, then just include them into
xinitrc. But yes, you are right, depending on the situation it might be
correct, though in most cases would just be redundant to source that
file from xinitrc. In my humble opinion.

-- 
Jesús Guerrero <[EMAIL PROTECTED]>

Reply via email to