[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
Mon May 18 06:29:23 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:14 hamish]:
 > > 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.

 Replying to [comment:15 glynn]:
 > If you change Gronsole::run_xterm to treat $cmd as a list, then the
 string will be interpreted according to Tcl list syntax, i.e. spaces
 separate arguments, but you can provide an argument which contains spaces
 by using braces or backslashes.

 hmmm, I had tried that, but it didn't seem to work. (again, I'm no tcl
 expert).

 As I see it we have two choices:

 1) use `eval "$@"` which may be technically wrong but it seems to work for
 all cases and means that the quoting works as the user expects using DOS
 or Bourne syntax. i.e. just quietly walk away.

 2) treat it as a tcl list, figure out how to implement that, and document
 somewhere that the user has to use {} instead of quotes.



 Hamish

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/604#comment:16>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list