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

Markus Neteler neteler at itc.it
Mon Aug 28 03:20:33 EDT 2006


Glynn Clements wrote on 08/28/2006 01:01 AM:
> 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.
>   
I will leave that to the author of r.mapcalculator.
> 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.
>   

I do remember discussions on 'which' use, but not the outcome. So far
it is used quite a bit:

cd scripts
grep which */* |grep '\[ ' | wc -l
58


> Also, the LD_LIBRARY_PATH=$GRASS_LD_LIBRARY_PATH in
> grass-xterm-wrapper is unnecessary.
>
>   
OK, removed.
But I thought that it would address above mentioned setuid/setgid issue:
http://grass.itc.it/pipermail/grass5/2004-September/015409.html

Markus




More information about the grass-dev mailing list