Problems creating panel launcher for application.

Christopher christopher.carroll at birch.net
Fri Jul 9 18:43:32 CEST 2004


On Fri, 2004-07-09 at 09:12, Wolf Lichtenberger wrote:
> Hi,
> 
> Jasper Huijsmans wrote:
> > On Fri, Jul 09, 2004 at 07:29:38AM -0500, Christian Dysthe wrote:
> >> 
> >>I have been using this command (without the quotes) to open the Streamtuner 
> >>application and have the local plugin work:
> >>
> >>"STREAMTUNER_LOCAL_ROOT=/home/christian/Media/Music streamtuner"
> [...]
> >
> > sh -c "STREAMTUNER_LOCAL_ROOT=/home/christian/Media/Music streamtuner"
> 
> Methinks an "export" could be useful for posterity:
> 
> sh -c "STREAMTUNER_LOCAL_ROOT=/home/christian/Media/Music streamtuner;\
>   export STREAMTUNER_LOCAL_ROOT"
> 
> (enter this as one line, omitting the "\" and possibly doubling the ";")

Actually, exporting the variable in this case accomplishes nothing.  It
would only be useful if the sh process were exec'ing additional
processes that needed it.  The line "VAR=val command" will ensure the
variable is exported to "command", which is the only process being
launched by sh.

Furthermore, even if you did have additional statements in the -c
argument, you would be exporting an unset variable.  The statement
"VAR=val command" only sets it for 'command', not the parent shell
itself, so after that statement executes VAR is unset, so there is
nothing to export.

If the -c arg was "VAR=val; command" (notice the semicolon), then you
would need to export VAR before command in order for command to pick it
up ("VAR=val; export VAR; command").  Exporting it after command would
not accomplish anything.

Sorry, not xfce-related.  But I wanted to try to clear up any
misconceptions.




More information about the Xfce mailing list