[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
Wed Aug 20 07:47: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 wenzeslaus):
Replying to [comment:1 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.
>
So, I will change this accoring to [http://lists.osgeo.org/pipermail
/grass-user/2014-August/070728.html GRASS-user Grass-7.0 beta3 fails to
launch]:
{{{
if sys.platform == 'cygwin':
}}}
I'm just not sure from the documentation if "equals", "startswith", or
"in" is more appropriate.
> 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.
>
According to comment and the source code I think that `SHELL` variable
might be somehow wrong sometimes.
* source:grass/trunk/lib/init/grass.py#L906
> Ideally, we shouldn't be trying to distinguish Cygwin from other Unix
platforms except where this turns out to be strictly necessary.
>
Yes, we would be defeating the purpose of Unix and Cygwin then but I guess
this is the exception.
> > 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.
>
OK, if we still support Cygwin and it is still possible to install GRASS
GIS like this we need to keep the code there.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2395#comment:9>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list