[GRASS-dev] Re: [GRASS GIS] #1099: GRASS 6.4SVN with MSYS fails to start startup screen

GRASS GIS trac at osgeo.org
Thu Apr 7 09:36:49 EDT 2011


#1099: GRASS 6.4SVN with MSYS fails to start startup screen
-----------------------------+----------------------------------------------
 Reporter:  marisn           |       Owner:  grass-dev@…              
     Type:  defect           |      Status:  new                      
 Priority:  normal           |   Milestone:  6.4.1                    
Component:  Default          |     Version:  svn-releasebranch64      
 Keywords:  wingrass, wxgui  |    Platform:  MSWindows Vista          
      Cpu:  Unspecified      |  
-----------------------------+----------------------------------------------
Changes (by marisn):

  * keywords:  wingrass => wingrass, wxgui


Comment:

 This issue seems to be caused by "clever" $HOME tricks by MSYS (?). $HOME
 is set to /home/%USERNAME% and it points to "C:\Program Files\GRASS
 6.4.SVN\msys\%USER%". The catch - there is no such folder as %USER% as
 %USER% migh not have permission to mkdir there. MSYS deals with it just
 fine - it "fools" every call that folder exists. Still it doesn't help
 Python or TCL, as they bypass MSYS and thus don't see MSYS dirty $HOME
 tricks.

 Working solution for Vista users is to add following line to beginning of
 the msys.bat file (seems to work OK also if %USERPROFILE% contains
 spaces):
 {{{
 set HOME=%USERPROFILE%
 }}}


 Here's some output for a new user "tests2" under Vista running 04.06.
 WinGRASS 6.4. (without %USERPROFILE% workaround and with some echo's and
 print's):
 {{{
 Hit RETURN to continue

 Starting GRASS ...
 GISBASE /C/Program Files/GRASS 6.4.SVN
 ^^EXISTS
 GISRC /tmp/grass6-tests2-5624/gisrc
 ^^EXISTS
 GISRCRC /home/tests2/.grassrc6
 ^^DOESNT
 And now calling gis_set.py....
 The current directory is invalid.
 preferences.py#679:gisenv={}
 os.getcwd=C:\PROGRA~1\GRASS6~1.SVN\msys\home\tests2

 Traceback (most recent call last):
   File "c:/Program Files/GRASS 6.4.SVN/etc/wxpython/gis_set.py", line 38,
 in <module>
     import gui_modules.goutput
   File "c:/osgeo4w/usr/src/grass64_release/dist.i686-pc-
 mingw32/etc/wxpython/gui_modules/goutput.py", line 37, in <module>
   File "c:\Program Files\GRASS
 6.4.SVN\etc\wxpython\gui_modules\preferences.py", line 941, in <module>
     globalSettings = Settings()
   File "c:\Program Files\GRASS
 6.4.SVN\etc\wxpython\gui_modules\preferences.py", line 613, in __init__
     self.ReadSettingsFile()
   File "c:\Program Files\GRASS
 6.4.SVN\etc\wxpython\gui_modules\preferences.py", line 680, in
 ReadSettingsFile
     gisdbase = gisenv['GISDBASE']
 KeyError: 'GISDBASE'
 Error in GUI startup. If necessary, please
 report this error to the GRASS developers.
 Switching to text mode now.
 Hit RETURN to continue...
 }}}

 Here's some output of gis.m after changing startup to use -tcltk instead
 of -wxpython (mentioned directory really doesn't exist):
 {{{
 couldn't change working directory to
 "C:/PROGRA~1/GRASS6~1.SVN/msys/home/tests2": no such file or directory
 couldn't change working directory to
 "C:/PROGRA~1/GRASS6~1.SVN/msys/home/tests2": no such file or directory
     while executing
 "cd $currdir"
     (procedure "MapCanvas::composite" line 24)
     invoked from within
 "MapCanvas::composite $mon"
     (procedure "MapCanvas::drawmap" line 40)
     invoked from within
 "MapCanvas::drawmap $mon"
     (procedure "MapCanvas::display_server" line 9)
     invoked from within
 "MapCanvas::display_server"
     ("after" script)
 }}}

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



More information about the grass-dev mailing list