Subject: FVWM: Solved: FvwmM4 and pl35

From: Chris Taylor <[email-masked]>
Date: Thu, 28 Sep 1995 23:23:13 -0400 (EDT)

Last week I submitted a message to the list describing a problem with
pl35 and FvwmM4. Arguments meant for FvwmM4 were, for some reason,
passing to fvwm itself. Even simple lines like

    fvwm -f "FvwmM4 .fvwmrc"

weren't working correctly. In the above example, I'd get an error
stating that ".fvwmrc" wasn't an option to fvwm.

Well folks, I feel pretty silly. I've learned yet again how Unix can
give you enough rope to shoot yourself in the foot. (Sorry for the
tortured analogy there...)

I run on multiple architectures -- Sun (mostly), SGI, and HP. To make
things easier for me, most of the files in my binary directories are
actually hardlinks to a shell script that figures out what
architecture I'm on, selects the appropriate directory of binaries,
and executes the chosen binary.

One of the Korn shell's more obscure quoting mechanisms is at the
heart of what tripped me up last week. The last line of my execution
script looks something like this:

    exec $BINDIR/$ARCHDIR/$PROGRAM $@

By using $@ , any command-line arguments I pass to the script go on
to the real program.

But! Here's the catch. That line should really look like this:

    exec $BINDIR/$ARCHDIR/$PROGRAM "$@"

Those double-quote marks around $@ made all the difference. The
reason: without the double quotes, command-line arguments are combined
and passed along as a single string. If "$@" is used, command-line
arguments are kept separate from each other.

So, it's no surprise fvwm was complaining about the command-line args.
It was getting exactly what I gave it! (grrr..)

Now that that's fixed, I'm running both pl35 *and* FvwmM4 with no
problems. Thanks to everyone for their help.

(For those interested in the details of my little goof-up, e-mail me
directly and I'll give you the scoop. Since my real problem was more
related to shell programming than Fvwm, I feel it's outside the scope of
the list.)

Christopher W. Taylor  |  You know you've been on the Net too long
[email-masked]    |  when you're reading a book next to your
[email-masked]       |  computer and you press the computer's
God is an iron.        |  space bar at the end of the book's page.

--
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].