[GRASS-dev] [GRASS GIS] #2395: Startup runs as in Cygwin when CYGWIN is set although running as native application

GRASS GIS trac at osgeo.org
Tue Aug 19 06:54:10 PDT 2014


#2395: Startup runs as in Cygwin when CYGWIN is set although running as native
application
------------------------------------------------------+---------------------
 Reporter:  wenzeslaus                                |       Owner:  grass-dev@…              
     Type:  defect                                    |      Status:  new                      
 Priority:  normal                                    |   Milestone:  7.0.0                    
Component:  Startup                                   |     Version:  svn-releasebranch70      
 Keywords:  cygwin, wingrass, environmetal variables  |    Platform:  MSWindows 8              
      Cpu:  Unspecified                               |  
------------------------------------------------------+---------------------
 Reported on mailing list, I don't know how Cygwin works, so this might be
 partially problem on user side but startup should be able to handle this.

 On [http://lists.osgeo.org/pipermail/grass-user/2014-August/070726.html
 Tue, Aug 19, 2014 at 2:58 AM, Sindile Bidla] wrote:
 >    /usr/bin/bash.exe: Command not found

 The problem is that "/usr/bin/bash.exe" is expected but not found. Why it
 is expected? Because once CYGWIN variable is in environmental variables,
 GRASS start up script thinks that it runs in the Cygwin mode and for some
 reasons needs to use full path.

 {{{
 #!python
     # cygwin has many problems with the shell setup
     # below, so i hardcoded everything here.
     if os.getenv('CYGWIN'):
         sh = "cygwin"
         shellname = "GNU Bash (Cygwin)"
         os.environ['SHELL'] = "/usr/bin/bash.exe"
         os.environ['OSTYPE'] = "cygwin"
 }}}

 In any case, this is not supposed to work as OSGeo4W and standalone GRASS
 are not Cygwin applications. They are native MS Windows applications, so
 this would anyway fail later.

 The problem is that you have CYGWIN variable in you environment and GRASS
 GIS then thinks that it is supposed to run as Cygwin application. This
 leads to three questions.

 1) Do you need CYGWIN variable in you environment for some reason? Are you
 using some Cygwin applications? (I don't know if the later implies the
 former but it seems that the Cygwin environment is not correct anyway.)
 Removing CYGWIN from the environment (at least for GRASS if this is
 possible on MS Windows) would workaround GRASS imperfect deciding about
 type of application it is (Cygwin or MS Windows native).

 2) For GRASS GIS, is there some better way of getting to know if it is
 running as Cygwin application?

 3) Is this Cygwin part even needed? We are not relying on Cygwin in GRASS
 GIS 7 anymore and we don't plan to do so, as far as I know. So, a possile
 solution is just removing this Cygwin-related code.

 Note that this is quite high priority because GRASS will not start when
 CYGWIN is in the enviroment.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2395>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list