FvwmCommand sometimes recognizes $HOME, sometimes doesn't

In most instances that I’m aware of, FvwmCommand has no trouble parsing $HOME to /home/myName

But the command

FvwmCommand 'Current (*) WindowStyle MiniIcon $HOME/.fvwm/png/matlab_16icon.png'

for some reason cannot unpack $HOME

There are easy work-arounds, but it seems unlikely that this is intended behavior??

You’ve done several mistakes in your command call:

  1. Don’t use single quotes if you use variables. Use double quotes instead.
  2. Use $FVWM_USERDIR instead of $HOME.
    2.1. FvwmCommand executes the commands the same way as in the config. So squared brackets around $FVWM_USERDIR are required, too.

Correct command string]
FvwmCommand “Current (*) WindowStyle MiniIcon $[FVWM_USERDIR]/png/matlab_16icon.png”
[/code]
Hope this helps.

– Thomas –

Thanks very much, Thomas. Seems the double quotes were enough, but the square brackets generated an error. Both of these commands worked fine, but obviously the second is preferred:

FvwmCommand "Current (*) WindowStyle MiniIcon $HOME/.fvwm/png/matlab_16icon.png" FvwmCommand "Current (*) WindowStyle MiniIcon $FVWM_USERDIR/png/matlab_16icon.png"

However,

FvwmCommand "Current (*) WindowStyle MiniIcon $[FVWM_USERDIR]/png/matlab_16icon.png"

generated:

Illegal variable name.

I thought this could be because I’m using a tcsh shell but then when I tried the command in a bash shell,
the same command generated.

bash: /home/simon/.fvwm: syntax error: operand expected (error token is "/home/simon/.fvwm")

Hi,
Sorry for the wrong information about the square brackets :blush:

I don’t using FvwmCommand… Every time the same… I shouldn’t wrote something without testing…

Best,
Thomas