[GRASS-dev] hardcoded 'xterm': wrapper?

Glynn Clements glynn at gclements.plus.com
Sun Aug 27 19:01:09 EDT 2006


Markus Neteler wrote:

> Thanks for your comments. I have implemented all of them,
> revised patch at
> 
> http://mpa.itc.it/markus/xterm_wrapper/
> 
> One problem remains:
> etc/grass-run.sh seems to fail (now?). I tested:
> 
> gis.m
> -> Raster
>    -> Map calculator
>      -> Formula: 1
>         Resulting output map: mytest
> 
>         -> Run runs ok, but
>            Run in Xterm fails with
> 
>  /home/neteler/soft/61grass_cvsexp/dist.i686-pc-linux-gnu/etc/grass-run.sh: line 30: : command not found
> 
> this line contains "$@". Seems to be tricky with a script calling
> a program calling a script ...

It seems to work for me, although I've only tested it briefly (copy
grass-xterm-wrapper and updated r.mapcalculator into installation
directory, run r.mapcalculator manually).

I note that r.mapcalculator doesn't use grass-run.sh, so it will have
problems if xterm is setuid/setgid. Also, outfile= and formula= are
listed as required, although they aren't needed if you use -e.

One minor point: I thought that using "which" was advised against, as
it isn't present on all platforms. If it is used, stderr should be
redirected to /dev/null, to silence the errors about
x-terminal-emulator not being found.

Also, the LD_LIBRARY_PATH=$GRASS_LD_LIBRARY_PATH in
grass-xterm-wrapper is unnecessary.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list