Subject: FVWM: Talking to fvwm2

From: [email-masked]
Date: Sat, 15 Aug 1998 18:16:00 -0700 (PDT)

Can I send commands or instructions to fvwm2 from another application?
Like poping up a menu from a shell or from a Gnome menu entry.
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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].

---

From: Bob Woodside <[email-masked]>
Date: Mon, 17 Aug 1998 21:44:54 -0400 (EDT)

> Like poping up a menu from a shell or from a Gnome menu entry.

        Short answer:  Yes, of course you can. Look at the man page for
FvwmCommand.

        Longer answer:  There are 2 parts to this. First, you have to start
the FvwmCommandS module from Fvwm via the command

                Module FvwmCommandS

Then you can invoke FvwmCommand from a shell or another program, passing any
valid Fvwm command as an argument to Fvwmcommand, like

                FvwmCommand "Popup MyFavoriteMenu"

        You can even use this technique to have an external program instruct
Fvwm to restart itself. Better yet, you can instruct Fvwm to reload its
config file (via something like "Read ~/.fvwm2rc", followed by a "Recapture"
command) without doing a Restart - *if* (Great Big Flashy Caveat) you have a 
well-formed config file (none of the currently distributed samples qualifies).

        By "well-formed" I mean that every Fvwm entity - like functions,
menus, and decors - that has a Destroyxxx command associated with it, must
have a Destroyxxx command preceding its definition, e.g.,

  DestroyMenu  MyFavorites
  AddToMenu    MyFavorites  "MyFavoriteThings"     Title
  +                         "Raindrops On Roses"   Exec exec myprog1
  +                         "Whiskers On Kittens"  Exec exec myprog2

etc. Otherwise, you end up with doubled and tripled menus, functions that
repeat the same actions several times, etc.

        Brief scolding:  The use of FvwmCommand has been discussed in at
least 2 threads in the past month. The Fvwm home page has a link to the
mailing list archives, and the archives are keyword-searchable. Before
firing off a question like this to a mailing list, you really ought to
browse a few posts - like, say, the past month's worth - to get a feel for
the list's tone, just as you should do with a Usenet group. Had you done
this, you'd have seen the answer to your question. (If you have no net
access other than e-mail, please accept my apology and my sympathy.)