[GRASS-dev] Re: [GRASS GIS] #604: /usr/lib/grass64/etc/grass-run.sh
does not
work properly when called by gis.m to execute in a external xterm
GRASS GIS
trac at osgeo.org
Sun May 17 02:33:25 EDT 2009
#604: /usr/lib/grass64/etc/grass-run.sh does not work properly when called by
gis.m to execute in a external xterm
-----------------------+----------------------------------------------------
Reporter: frankie | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: critical | Milestone: 6.4.0
Component: Tcl | Version: 6.4.0 RCs
Resolution: | Keywords: xterm
Platform: Linux | Cpu: Unspecified
-----------------------+----------------------------------------------------
Comment (by hamish):
Replying to [comment:13 glynn]:
> Okay; it appears to be a bug in Gronsole::run_xterm
> (lib/gtcltk/gronsole.tcl):
>
{{{
exec -- $env(GISBASE)/etc/grass-xterm-wrapper -name xterm-grass -e
env(GISBASE)/etc/grass-run.sh $cmd &
}}}
>
> The command is being treated as a string, and passed as a single
> argument. It should be a list, and each element should be a
> separate argument to "exec". See the "term" procedure in
> runandoutput.tcl for an example of calling "exec" with a list
> of arguments.
ok, thanks.
but more fundamentally the $cmd string is passed from
gis.m/runandoutput.tcl as a whole concatenated string, and so run_term in
gtcltk/gronsole.tcl has no $args list to work with.
and how can runandoutput.tcl know how to parse apart the "Run (in Xterm)"
command string into a series of without extra quoting parsing and logic?
As a "document it and walk away" solution I tried replacing "" with {} for
the quoting in my input command, but that didn't help at all.
fwiw1: all modules in the gmmenu.tcl menu called with "term" are single
element, ie just the name of the module. so this is just a problem with
the "Run (in Xterm)" button in the Output window.
fwiw2: on native WinGRASS all 4 "Run" buttons fail for the v.db.select
example listed earlier in this bug report, but pass for 'g.proj -p'.
aside: I notice gronsole.tcl uses "&" at the end of the cmd.exe run_xterm.
does that work on windows?
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/604#comment:14>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list