[QGIS-trac] Re: [Quantum GIS] #1680: New GRASS shell does not display command gui

Quantum GIS qgis at qgis.org
Mon Jul 20 14:54:08 EDT 2009


#1680: New GRASS shell does not display command gui
-----------------------------------------------------+----------------------
        Reporter:  cgsbob                            |         Owner:  nobody       
            Type:  bug                               |        Status:  reopened     
        Priority:  major: does not work as expected  |     Milestone:  Version 1.2.0
       Component:  GRASS                             |       Version:  HEAD         
      Resolution:                                    |      Keywords:               
Platform_version:                                    |      Platform:  All          
        Must_fix:  No                                |   Status_info:  0            
-----------------------------------------------------+----------------------
Changes (by cgsbob):

  * status:  closed => reopened
  * resolution:  fixed =>

Comment:

 I am not able to get to a GRASS> prompt.  Looking at the code, it appears
 that you assume that grass is installed in the /usr tree.  Well, grass on
 my system is installed in /usr/local.

 So, I changed the code like this:
 {{{
 Index: src/plugins/grass/qgsgrassshell.cpp
 ===================================================================
 --- src/plugins/grass/qgsgrassshell.cpp (revision 11120)
 +++ src/plugins/grass/qgsgrassshell.cpp (working copy)
 @@ -83,7 +83,7 @@
    QStringList env("");
    QStringList args("");

 -  QString shellProgram =
 QString("/usr/bin/grass%1%2").arg(QgsGrass::versionMajor()).arg(QgsGrass::versionMinor());
 +  QString shellProgram =
 QString("/usr/local/bin/grass%1%2").arg(QgsGrass::versionMajor()).arg(QgsGrass::versionMinor());

    terminal->setShellProgram(shellProgram);
    env << "TERM=vt100";

 }}}

 Now the QGIS GRASS Shell starts and another problem appears.  Executing
 the first grass command w/o argument closes the QGIS Grass Shell.
 Reopening the QGIS Grass Shell and running the same command now opens up
 the grass gui.  At this point, the QGIS GRASS Shell functions the same as
 the GRASS Shell.

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/1680#comment:10>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list