RE: FVWM: Talking to fvwm2

From: Bob Woodside <proteus_at_pcnet.com>
Date: Mon, 17 Aug 1998 21:44:54 -0400 (EDT)

On 16-Aug-98 edtawfal_at_value.net wrote:
> 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.

        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.)


 
--
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 majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Mon Aug 17 1998 - 20:59:31 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:01 BST