Re: FVWM: Shell scripts in FVWM menus

From: Marcus Lundblad <ml_at_update.uu.se>
Date: Sun, 16 Mar 2003 10:16:44 +0100 (CET)

On Sat, 15 Mar 2003, Timothy Groves wrote:

> Okay, I've RTFM, and it doesn't address this question: How exactly does one run a shell script from an FVWM exec command?

I have a script called opendir that looks like this:

-------------------------------

#!/bin/sh

# this script opens a directory in a file manager

# check if user has set $FILEMAN

if [ -n "$FILEMAN" ]; then
    `$FILEMAN` $* >/dev/null 2>&1
elif which rox > /dev/null 2>&1; then
    rox $* >/dev/null 2>&1
elif [ `which gmc` ]; then
    gmc $* >/dev/null 2>&1
# last resort, use good ol' xfm... :-)
else
    xfm $* >/dev/null 2>&1
fi

--------------------------------

Then I use it like this in .fvwm2rc:

AddToMenu RootMenu "Root Menu" Title
+ "New Window" Exec exec terminal
+ "Home Directory" Exec $HOME/.fvwm/opendir ~

This has always worked.

Maybe it's because of the " >/dev/null 2>&1 " ?

//Marcus



--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Sun Mar 16 2003 - 03:18:05 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:54 BST