Startup runs as in Cygwin when CYGWIN is set although running as native application
|Reported by:||wenzeslaus||Owned by:|
|Keywords:||cygwin, wingrass, environmetal variables||Cc:|
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.
/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.
# 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.