I downloaded wingrass63_cvs20070820.zip http://moritz.homelinux.org/grass/wingrass/wingrass63_cvs20070820.zip20-Aug-2007 16:37 23M version and and launched the file to the c:\ drive. Using cmd and grass63.bat, I got the opening gui where the location and mapset (spearfish60) were placed. But when “enter grass” was pressed the following "error in startup script’ occurred.
.ERROR: program ‘g.gisenv’ cannot be executed because: Neither a command line (cmd) or interactive (inter) version was found.
mail: not found while executing “exec g-gisenv get=GISDBASE” invoked from within
“set env(GISDBASE) [exec g.gisenv get=GISDBASE]”
(file “c:/grass/grass-6.3.cvs\etc\gm\gm.tcl” line31)
I have cygwin Grass6.0.cvs running successfully on my d:\ drive and the two grassrc6 files do not appear to conflict since they are on separate drives.
My first guess would be some kind of path problem. I’m not sure how this is set with WinGRASS, but it sounds like it can’t find the /bin directory within GRASS.
I downloaded wingrass63_cvs20070820.zip http://moritz.homelinux.org/grass/wingrass/wingrass63_cvs20070820.ziphttp://moritz.homelinux.org/grass/wingrass/wingrass63_cvs20070820.zip 20-Aug-2007 16:37 23M version and and launched the file to the c:\ drive. Using cmd and grass63.bat, I got the opening gui where the location and mapset (spearfish60) were placed. But when “enter grass” was pressed the following "error in startup script’ occurred.
.ERROR: program ‘g.gisenv’ cannot be executed because: Neither a command line (cmd) or interactive (inter) version was found.
mail: not found while executing “exec g-gisenv get=GISDBASE” invoked from within
“set env(GISDBASE) [exec g.gisenv get=GISDBASE]”
(file “c:/grass/grass-6.3.cvs\etc\gm\gm.tcl” line31)
I have cygwin Grass6.0.cvs running successfully on my d:\ drive and the two grassrc6 files do not appear to conflict since they are on separate drives.
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
I got wingrass63_cvs20070825.zip25-Aug-2007 to work by adding “set path=”%wingisbase%\etc\init.bat" %* (last line of grass63.bat) and then using init.bat to start the application.
My first guess would be some kind of path problem. I’m not sure how this is set with WinGRASS, but it sounds like it can’t find the /bin directory within GRASS.
I downloaded wingrass63_cvs20070820.zip http://moritz.homelinux.org/grass/wingrass/wingrass63_cvs20070820.ziphttp://moritz.homelinux.org/grass/wingrass/wingrass63_cvs20070820.zip 20-Aug-2007 16:37 23M version and and launched the file to the c:\ drive. Using cmd and grass63.bat, I got the opening gui where the location and mapset (spearfish60) were placed. But when “enter grass” was pressed the following "error in startup script’ occurred.
.ERROR: program ‘g.gisenv’ cannot be executed because: Neither a command line (cmd) or interactive (inter) version was found.
mail: not found while executing “exec g-gisenv get=GISDBASE” invoked from within
“set env(GISDBASE) [exec g.gisenv get=GISDBASE]”
(file “c:/grass/grass-6.3.cvs\etc\gm\gm.tcl” line31)
I have cygwin Grass6.0.cvs running successfully on my d:\ drive and the two grassrc6 files do not appear to conflict since they are on separate drives.
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
Installation instructions at <http://grass.itc.it/grass62/binary/mswindows/> say that "there's no grass.bat script", but (no matter what I try) there is no way for me to start grass with the recommended cygwin_grass.bat. It just works fine if there is an X server already started from a previous grass.bat run.
Below you find the error log I have obtained via the following command
cygwin_grass.bat > c:\cygwin\all_out.txt 2>&1
Any hints appreciated,
Luigi
Cleaning up temporary files.....
Starting GRASS ...
Application initialization failed: this isn't a Tk applicationcouldn't connect to display "localhost:0"
Error in startup script: dynamic loading is not currently available on this system
while executing
"load /usr/local/lib/tk8.4/../libtk8.4.a Tk"
("package ifneeded" script)
invoked from within
"package require Tk 8.0"
("package ifneeded" script)
invoked from within
"package require -exact BWidget 1.2.1"
(file "/usr/local/grass-6.2.2/etc/gtcltk/options.tcl" line 15)
invoked from within
"source $env(GISBASE)/etc/gtcltk/options.tcl"
(file "/usr/local/grass-6.2.2/etc/gis_set.tcl" line 29)
e[He[JWelcome to GRASS 6.2.2 (2007)
GRASS homepage: http://grass.itc.it/
This version running thru: GNU Bash (Cygwin) (/usr/bin/bash.exe)
Help is available with the command: g.manual -i
See the licence terms with: g.version -c
If required, restart the graphical user interface with: gis.m &
When ready to quit enter: exit
Application initialization failed: this isn't a Tk applicationcouldn't connect to display "localhost:0"
Error in startup script: dynamic loading is not currently available on this system
while executing
"load /usr/local/lib/tk8.4/../libtk8.4.a Tk"
("package ifneeded" script)
invoked from within
"package require Tk 8.0"
("package ifneeded" script)
invoked from within
"package require -exact BWidget 1.2.1"
(file "/usr/local/grass-6.2.2/etc/gm/gm.tcl" line 24)
Installation instructions at
<http://grass.itc.it/grass62/binary/mswindows/> say that "there's no
grass.bat script", but (no matter what I try) there is no way for me to
start grass with the recommended cygwin_grass.bat. It just works fine
if there is an X server already started from a previous grass.bat run.
Below you find the error log I have obtained via the following command
cygwin_grass.bat > c:\cygwin\all_out.txt 2>&1
..
Starting GRASS ...
Application initialization failed: this isn't a Tk applicationcouldn't
connect to display "localhost:0"
Error in startup script: dynamic loading is not currently available on
this system
while executing
"load /usr/local/lib/tk8.4/../libtk8.4.a Tk"
..
Did you modify the bash line to run startx, launching X at startup?
bash --login -i -c startx
Installation instructions at
[<http://grass.itc.it/grass62/binary/mswindows/>](http://grass.itc.it/grass62/binary/mswindows/) say that "there's no
grass.bat script", but (no matter what I try) there is no way for me to
start grass with the recommended cygwin_grass.bat. It just works fine
if there is an X server already started from a previous grass.bat run.
Below you find the error log I have obtained via the following command
cygwin_grass.bat > c:\cygwin\all_out.txt 2>&1
..
Starting GRASS ...
Application initialization failed: this isn't a Tk applicationcouldn't
connect to display "localhost:0"
Error in startup script: dynamic loading is not currently available on
this system
while executing
"load /usr/local/lib/tk8.4/../libtk8.4.a Tk"
..
Did you modify the bash line to run startx, launching X at startup?
bash --login -i -c startx
Yes, I did. Here is my cygwin_grass.bat file:
@echo off
C:
chdir C:\cygwin\bin
set GRASS_AUTOSTART=1
bash --login -i -c startx
If I run just the last line at the command prompt:
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
winValidateArgs - g_iNumScreens: 1 iMaxConsecutiveScreen: 1
(II) XF86Config is not supported
(II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information
winDetectSupportedEngines - Windows NT/2000/XP
winDetectSupportedEngines - DirectDraw installed
winDetectSupportedEngines - DirectDraw4 installed
winDetectSupportedEngines - Returning, supported engines 00000007
winSetEngine - Multi Window or Rootless => ShadowGDI
winAdjustVideoModeShadowGDI - Using Windows display depth of 32 bits per pixel
winAllocateFBShadowGDI - Creating DIB with width: 1024 height: 768 depth: 32
winFinishScreenInitFB - Masks: 00ff0000 0000ff00 000000ff
winInitVisualsShadowGDI - Masks 00ff0000 0000ff00 000000ff BPRGB 8 d 24 bpp 32
null screen fn ReparentWindow
null screen fn RestackWindow
InitQueue - Calling pthread_mutex_init
InitQueue - pthread_mutex_init returned
InitQueue - Calling pthread_cond_init
InitQueue - pthread_cond_init returned
winInitMultiWindowWM - Hello
winInitMultiWindowWM - Calling pthread_mutex_lock ()
winMultiWindowXMsgProc - Hello
winMultiWindowXMsgProc - Calling pthread_mutex_lock ()
MIT-SHM extension disabled due to lack of kernel support
XFree86-Bigfont extension local-client optimization disabled due to lack of shared memory support in the kernel
(–) Setting autorepeat to delay=500, rate=31
(–) winConfigKeyboard - Layout: “00000410” (00000410)
(–) Using preset keyboard for “Italian” (410), type “4”
Rules = “xorg” Model = “pc105” Layout = “it” Variant = “(null)” Options = “(null)”
The XKEYBOARD keymap compiler (xkbcomp) reports:
Warning: Type “ONE_LEVEL” has 1 levels, but has 2 symbols
Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server
(–) 3 mouse buttons found
Could not init font path element /usr/X11R6/lib/X11/fonts/TTF/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Type1/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from list!
winPointerWarpCursor - Discarding first warp: 512 384
winInitMultiWindowWM - pthread_mutex_lock () returned.
winProcEstablishConnection - Hello
And X does start (it is an X terminal and if I type grass62 and hit return, GRASS starts just fine). But if I manually run at promt:
set GRASS_AUTOSTART=1
bash --login -i -c startx
the next thing I see is the GRASS startup message
Cleaning up temporary files…
Starting GRASS …
And no X runs. GRASS starts in text mode but then it tries to load a GUI and off course this fails.
Hope I provided some useful info. Thanks in advance,
Luigi
P.S. I also added the following at the and of .bashrc
>> Starting GRASS ...
>> Application initialization failed: this isn't a Tk
>> applicationcouldn't connect to display "localhost:0"
>> Error in startup script: dynamic loading is not currently available
>> on this system
>> while executing
>> "load /usr/local/lib/tk8.4/../libtk8.4.a Tk"
> ..
Hamish:
> Did you modify the bash line to run startx, launching X at startup?
> bash --login -i -c startx
Yes, I did. Here is my cygwin_grass.bat file:
..
the next thing I see is the GRASS startup message
Cleaning up temporary files.....
Starting GRASS ...
And no X runs. GRASS starts in text mode but then it tries to load a
GUI and off course this fails.
No idea as to what is going wrong.
The plan is that cygwin starts X11 on startup (-c startx) in the cygwin
dos-box; then X11 opens a xterm when it starts; and that xterm launches
grass. The '-n "$DISPLAY"' part should protect against it trying to start
grass from the cygwin dos-box outside of X11. What does:
echo $DISPLAY
say from the cygwin dos-box prompt (not the xterm).
Installation instructions at
[<http://grass.itc.it/grass62/binary/mswindows/>](http://grass.itc.it/grass62/binary/mswindows/)
..
Starting GRASS ...
Application initialization failed: this isn't a Tk
applicationcouldn't connect to display "localhost:0"
Error in startup script: dynamic loading is not currently available
on this system
while executing
"load /usr/local/lib/tk8.4/../libtk8.4.a Tk"
..
Hamish:
Did you modify the bash line to run startx, launching X at startup?
bash --login -i -c startx
Yes, I did. Here is my cygwin_grass.bat file:
..
the next thing I see is the GRASS startup message
Cleaning up temporary files.....
Starting GRASS ...
And no X runs. GRASS starts in text mode but then it tries to load a
GUI and off course this fails.
No idea as to what is going wrong.
The plan is that cygwin starts X11 on startup (-c startx) in the cygwin
dos-box; then X11 opens a xterm when it starts; and that xterm launches
grass. The '-n "$DISPLAY"' part should protect against it trying to start
grass from the cygwin dos-box outside of X11. What does:
echo $DISPLAY
say from the cygwin dos-box prompt (not the xterm).
?
Hamish
It says
127.0.0.1:0.0
Nice cue: I had a $DISPLAY set via the winXP control panel that was apparently interfering with the
if [ -n “$DISPLAY” ] && [ -n “$GRASS_AUTOSTART” ] ; then
switch at the bottom of .bashrc (this is probably why GRASS would start before the XTerm was running, as you said. Now I understand the rationale behind it).
As an aside, if I run a cygwin_grass_modified.bat script that is basically grass61.bat (and all related environmental variables that are set therein) except that I deleted the
run xterm …
line and added
set GRASS_AUTOSTART=1
bash --login -i -c startx
what happens is that GRASS runs inside dos-box (or at least this what the shell looks like – the title bar says “C:\WINDOWS\system32\cmd.exe”) but since there is an X Server running, the GUI loads OK and faster than with the regular cygwin_grass.bat file. Apparently, the lower loading time is due to no XTerm starting up in the latter case – there is only one shell open. Don’t know if this can be of any use.
Unrelated thing: in the process I also found out that in order for the g.manual script to display cygwin/GRASS HTML help files, the cygwin_root environmental variable needs to be set up in cygwin_grass.bat
SET CYGWIN_ROOT=c:\cygwin
otherwise it is empty (it used to be set up by grass61.bat, but not by cygwin_grass.bat) when g.manual calls it. (Again, from a previous post, there is a lot of missing HTML help files in the version I downloaded – 6.2.2-1: is it just a download error?)