Re: FVWM: Argument Passing?

From: <jtl_at_cs.man.ac.uk>
Date: Sat, 15 Jan 2000 15:35:03 GMT

> From: "Thomas A. Gardiner" <gardiner_at_pas.rochester.edu>

> The first suggestion.
>
> AddToFunc SwitchDecor
> + "I" Exec echo $0 > HOME/USER_WM_STYLE
> + "I" Restart HOME/bin/RunWM
>

> >> In other places where I want to wait for an Exec to complete before moving on
> >> I use PipeRead instead: so, one could try:
> >>
> >> AddToFunc SwitchDecor
> >> + "I" PipeRead "echo $0 > HOME/USER_WM_STYLE"
> >> + "I" Restart HOME/bin/RunWM
>
> This suggestion works just fine for me. There is one interesting
> difference from the first suggestion above. I pipe stdout and stderr to
> ~/.FVWM2-errors with
>
> fvwm2 -cmd 'FvwmM4 fvwm2rc.m4' > ~/.FVWM2-errors 2>&1
>
> The first suggestion causes the output of subsequent restarts to be
> appended to the file. The second suggestion causes the file to be
> overwritten. There is definitely something going on here, but I'll be
> damned if I know what...

That's odd: one would expect BOTH to overwite the file, as the fvwm2 process
is being replaced by a new instance of RunWM, which is then replaced
(presumably) by a new instance of fvwm2.

On the other hand, a simple Restart, or Restart fvwm2 (I think) does NOT
replace the current process, merely `restarts' it: so the output is appended.
Perhaps when you tried the first method it was really somehow just doing a
Restart fvwm2?

>
> The third suggestion gives me an error for some unknown reason.
>
> >> AddToFunc SwitchDecor
> >> + "I" PipeRead "echo $0 > HOME/USER_WM_STYLE; echo Restart HOME/bin/
> >> RunWM"
>
> [FVWM][Done]: <<ERROR>> Call of '/home/tom/bin/RunWM' failed!!!!
> (restarting 'fvwm2' instead)
>
> Anyone have an idea why??? I guess it doesn't matter, the second
> suggestion works. I should just use it and move on...

Ah yes! I've seen this one before. Was your error really:

        [FVWM][Done]: <<ERROR>> Call of '/home/tom/bin/RunWM
        ' failed!!!!
        (restarting 'fvwm2' instead)

i.e. a new line inside the quotes?

The text I suggested should have had a -n on the second echo:

        + "I" PipeRead "echo $0 > HOME/USER_WM_STYLE; echo -n Restart HOME/bin/RunWM

I don't know why -- can anybody explain? The trailing newline from the
PipeRead gets treated as part of the name of the process for the Restart
command. Is this a bug?

John Latham
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Sat Jan 15 2000 - 09:38:10 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:50 BST