Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Talking to fvwm2

0 views
Skip to first unread message

edta...@value.net

unread,
Aug 16, 1998, 3:00:00 AM8/16/98
to
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 majo...@hpc.uh.edu.
To report problems, send mail to fvwm-...@hpc.uh.edu.


Bob Woodside

unread,
Aug 18, 1998, 3:00:00 AM8/18/98
to

On 16-Aug-98 edta...@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.)

0 new messages