executing .fvwm2rc functions from a command-line?


Anyone know if it is possible to execute a function defined in my .fvw2rc file directly from a command line?

e.g. send a command from machineA to machineB via rshell, and call a function in the .fvwm2rc directly like: /home/foo_user/.fvwm/.fvw2rc FuncMyFoo

is that even possible with fvwm?

just curious… so, thought I’d ask.

  • Skender

Check the man pages for FvwmCommand i belive its called. It lets you issue commands to fvwm through the commandline. Im not very familiar with it so i cant really give anymore details about it.


That’s right – FvwmCommand is probably the way to go. All you need to do is add:

AddToFunc StartFunction I Module FvwmCommandS

… and then you can use FvwmCommand from the command-line.

Skender: quite why you’re using ‘rsh’ and not ‘ssh’ is beyond me.

– Thomas Adam


Good question… and unfortunately, I don’t have a good answer…

I was told that it was a ‘business’ decision… and that


Could someone check my logic on the below bash script for my .fvwm2rc?

here’s my bash script (called showFoo)

fvwmfunction='FooVisible'\ "$name"
echo "$fvwmfunction"|FvwmCommand -c

I have placed this in /home/foo_user/.fvwm/scripts directory.

In my .fvwm2rc I have:

DestroyFunc FooVisible
AddToFunc   FooVisible
+ I GoToDesk 0 1
+ I Iconify off
+ I Raise
+ I Focus

as well as:

AddToFunc StartFunction I Module FvwmCommandS
+ I .....

the reason I ask for someone to take a look at this is when I run the below command from the shell, I am not getting anything to happen:


Is there a path setting I need to establish in my script/.fvwm2rc file or something? It would make sense, since how else could the bash script know where the .fvwm2rc is?

I just am clueless where/how to establish that (if necessary).


FvwmCommand uses a FIFO to communicate to fvwm (see fifo(4)) so it has to be run on the same machine as fvwm. Fifoes does not work over NFS.

Anyway, I don’t see errors in your scripts (maybe FvwmCommand “$fvwmfunction” should be simpler than echo “$fvwmfunction” | FvwmCommand -c).

That’s true, although there are a number of tricks you can do…

– Thomas Adam