[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 13:49:11 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                               |  
------------------------------------------------------+---------------------

Comment(by glynn):

 Replying to [ticket:2395 wenzeslaus]:

 > 1) Do you need CYGWIN variable in you environment for some reason?

 FWIW, the CYGWIN variable isn't even set in my Cygwin64 environment, so
 checking it may lead to false negatives as well as false positives.

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

 For a Python script, sys.platform will tell you if you're running a Cygwin
 version of Python.

 Another option would be to check for the presence of the variable SHELL in
 the environment. If it doesn't exist, GRASS is probably being launched
 from a desktop icon or start menu entry, in which case the GUI should be
 started directly. If SHELL is set, GRASS should spawn a session using that
 shell, in the current console.

 Ideally, we shouldn't be trying to distinguish Cygwin from other Unix
 platforms except where this turns out to be strictly necessary.

 > 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.

 This isn't version-specific. For a long time, we have offered GRASS for
 both (native) Windows and Cygwin. Some Windows users (e.g. those who
 already use Cygwin for other reasons) may prefer the Cygwin version.

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



More information about the grass-dev mailing list