[GRASS-user] g.manual tries to run C:\Program Files\Internet Exporer\iexplore (the 'L' is missing from 'Explorer')

Hi Markus,

Thanks for the suggestion and the link to the changeset. It turns out I had
already made that change, having also discovered grass64.bat after editing
grass.bat.

That particular command was commented out in my version; I tried
un-commenting it but I still got the same error.

The relevant contents of my two batch files are:

C:\OSGeo4W\bin\grass64.bat
--------------------------
...
rem Path to your web browser
rem set GRASS_HTML_BROWSER=%SYSTEMDRIVE%\PROGRA~1\INTERN~1\IEXPLORE.EXE
...

I also tried changing the above statement to:
set GRASS_HTML_BROWSER=%PROGRAMFILES%\Internet Explorer\iexplore.exe

but I still got the same error.

C:\OSGeo4W\etc\ini\grass.bat
----------------------------
...
set GRASS_HTML_BROWSER=%PROGRAMFILES%\Internet Explorer\iexplore
...

I can confirm that grass.bat is executed, but it also appears to be
overridden by grass64.bat (I can tell because the g.manual error contains
"iexplorer.exe" rather than just "iexplore").

After some investigation I also found another copy of grass64.bat at
C:\OSGeo4W\apps\grass\bin, however the second copy does not appear to be
executed and is missing several statements.

The operation and purpose of all the batch files isn't clear to me at the
moment but I will help where I can to diagnose the problem.

Cheers,

Frank

------------------------------

Message: 2
Date: Sat, 25 Jul 2009 18:48:52 +0200
From: Markus Neteler <neteler@osgeo.org>
Subject: Re: [GRASS-user] g.manual tries to run C:\Program Files\Internet
Exporer\iexplore (the 'L' is missing from 'Explorer')
To: Frank Bilki <fbilki@gmail.com>
Cc: GRASS user list <grass-user@lists.osgeo.org>
Message-ID:
  <86782b610907250948m49ba0b0ey92eec0a1394e068@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Sat, Jul 25, 2009 at 4:58 PM, Frank Bilki<fbilki@gmail.com> wrote:

Hi All,

Being very, very new to GRASS (6.4.0svn, installed via OSGeo4W) I am

reading

as much documentation as I can lay my hands on, but I keep hitting a
recurring problem:

Every time I run g.manual I get an error saying it cannot find 'C:\Program
Files\Internet Exporer\iexplore'. After reading the message very carefully

I

realised it is because the 'L' is missing from 'Explorer'.

This has been reported in
http://trac.osgeo.org/osgeo4w/ticket/86
and AFAIK been fixed. Unfortunately the OSGeo4W-GRASS is
old(er) and does not seem to incorporate this fix. We made
several other fixes, too, which are missing.

Action item: We need a volunteer to take over compilation of the
OSGeo4W-GRASS package. PLEASE SOMEONE :slight_smile:

According to the manual page on GRASS Variables and Environment Variables,
GRASS_HTML_VIEWER is a 'shell environment' variable (this name makes no
sense to me running under Windows Vista) and I should be able to set it to
the full path of my current HTML browser. I tried creating a new System
Variable from My Computer called GRASS_HTML_VIEWER containing the
appropriate path. It didn't work; GRASS still looked for Internet

'Exporer'.

After a great deal of searching my computer I discovered that the

offending

path is stored within the 'C:\OSGeo4W\etc\ini\grass.bat' file. However, I
can't find any references in the documentation that could lead me there in

a

more controlled way.

But, even after I added the 'L' to the path I still get the same error:

C:\Program Files\Internet Explorer\iexplore: command not found

I have seen this:
http://trac.osgeo.org/grass/changeset/37214

but I wonder if OSGeo4W has a different grass.bat file?

What is wrong with this command? Is it because there are spaces in the
folder names? I've tried putting it in quotes, changing %PROGRAMFILES% to
C:\Program Files, and putting the .exe after iexplore, but nothing seems

to

work.

Please check with above changeset, maybe it gives an idea.

I know there are alternative ways to get to the documentation (which are
what I'm using now), but I am using this as a learning exercise and I want
to understand exactly what's happening here. I also wanted to share this
with others who might be having the same problem with this particular
version.

Thanks for trying, we really appreciate feedback (and need more power
users for OSGeo4W).

Markus

Hi Frank,

Try:
set GRASS_HTML_BROWSER=C:/Progra~1/Intern~1/iexplore

You can also cast opening the following file on your browser:
file:///C:/OSGeo4W/apps/grass/grass-6.4.0svn/docs/html/full_index.html
(change the version directory)

bests

milton

2009/7/26 Frank Bilki <fbilki@gmail.com>

Hi Markus,

Thanks for the suggestion and the link to the changeset. It turns out I had
already made that change, having also discovered grass64.bat after editing
grass.bat.

That particular command was commented out in my version; I tried
un-commenting it but I still got the same error.

The relevant contents of my two batch files are:

C:\OSGeo4W\bin\grass64.bat


rem Path to your web browser
rem set GRASS_HTML_BROWSER=%SYSTEMDRIVE%\PROGRA~1\INTERN~1\IEXPLORE.EXE

I also tried changing the above statement to:
set GRASS_HTML_BROWSER=%PROGRAMFILES%\Internet Explorer\iexplore.exe

but I still got the same error.

C:\OSGeo4W\etc\ini\grass.bat



set GRASS_HTML_BROWSER=%PROGRAMFILES%\Internet Explorer\iexplore

I can confirm that grass.bat is executed, but it also appears to be
overridden by grass64.bat (I can tell because the g.manual error contains
“iexplorer.exe” rather than just “iexplore”).

After some investigation I also found another copy of grass64.bat at
C:\OSGeo4W\apps\grass\bin, however the second copy does not appear to be
executed and is missing several statements.

The operation and purpose of all the batch files isn’t clear to me at the
moment but I will help where I can to diagnose the problem.

Cheers,

Frank


Message: 2
Date: Sat, 25 Jul 2009 18:48:52 +0200
From: Markus Neteler <neteler@osgeo.org>
Subject: Re: [GRASS-user] g.manual tries to run C:\Program Files\Internet
Exporer\iexplore (the ‘L’ is missing from ‘Explorer’)
To: Frank Bilki <fbilki@gmail.com>
Cc: GRASS user list <grass-user@lists.osgeo.org>
Message-ID:
<86782b610907250948m49ba0b0ey92eec0a1394e068@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Sat, Jul 25, 2009 at 4:58 PM, Frank Bilki<fbilki@gmail.com> wrote:

Hi All,

Being very, very new to GRASS (6.4.0svn, installed via OSGeo4W) I am
reading
as much documentation as I can lay my hands on, but I keep hitting a
recurring problem:

Every time I run g.manual I get an error saying it cannot find ‘C:\Program
Files\Internet Exporer\iexplore’. After reading the message very carefully
I
realised it is because the ‘L’ is missing from ‘Explorer’.

This has been reported in
http://trac.osgeo.org/osgeo4w/ticket/86
and AFAIK been fixed. Unfortunately the OSGeo4W-GRASS is
old(er) and does not seem to incorporate this fix. We made
several other fixes, too, which are missing.

Action item: We need a volunteer to take over compilation of the
OSGeo4W-GRASS package. PLEASE SOMEONE :slight_smile:

According to the manual page on GRASS Variables and Environment Variables,
GRASS_HTML_VIEWER is a ‘shell environment’ variable (this name makes no
sense to me running under Windows Vista) and I should be able to set it to
the full path of my current HTML browser. I tried creating a new System
Variable from My Computer called GRASS_HTML_VIEWER containing the
appropriate path. It didn’t work; GRASS still looked for Internet
‘Exporer’.

After a great deal of searching my computer I discovered that the
offending
path is stored within the ‘C:\OSGeo4W\etc\ini\grass.bat’ file. However, I
can’t find any references in the documentation that could lead me there in
a
more controlled way.

But, even after I added the ‘L’ to the path I still get the same error:

C:\Program Files\Internet Explorer\iexplore: command not found

I have seen this:
http://trac.osgeo.org/grass/changeset/37214

but I wonder if OSGeo4W has a different grass.bat file?

What is wrong with this command? Is it because there are spaces in the
folder names? I’ve tried putting it in quotes, changing %PROGRAMFILES% to
C:\Program Files, and putting the .exe after iexplore, but nothing seems
to
work.

Please check with above changeset, maybe it gives an idea.

I know there are alternative ways to get to the documentation (which are
what I’m using now), but I am using this as a learning exercise and I want
to understand exactly what’s happening here. I also wanted to share this
with others who might be having the same problem with this particular
version.

Thanks for trying, we really appreciate feedback (and need more power
users for OSGeo4W).

Markus


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Hi Milton,

That worked! Thanks so much for the suggestion.

I experimented with combining the forward slashes and the full pathname with
spaces (e.g. C:/Program Files/Internet Explorer/iexplore) and that also
worked. So it seems the cause was using back-slashes instead of
forward-slashes.

I notice that the batch file contains a mixture of back- and
forward-slashes, e.g.:

set WINGISBASE=%OSGEO4W_ROOT%/apps/grass/grass-6.4.0svn
"%WINGISBASE%"\etc\init.bat %*

Is there a systematic rule for choosing which to use?

Cheers,

Frank

From: Milton Cezar Ribeiro [mailto:miltinho.astronauta@gmail.com]
Sent: Sunday, 26 July 2009 2:05 PM
To: Frank Bilki
Cc: grass-user@lists.osgeo.org; neteler.osgeo@gmail.com
Subject: Re: [GRASS-user] g.manual tries to run C:\Program Files\Internet
Exporer\iexplore (the 'L' is missing from 'Explorer')

Hi Frank,

Try:
set GRASS_HTML_BROWSER=C:/Progra~1/Intern~1/iexplore

You can also cast opening the following file on your browser:
file:///C:/OSGeo4W/apps/grass/grass-6.4.0svn/docs/html/full_index.html
(change the version directory)

bests

milton

Frank Bilki wrote:

Subject: Re: [GRASS-user] g.manual tries to run C:\Program Files\Internet Exporer\iexplore (the 'L' is missing from 'Explorer')

this is osgeo4w bug #86,

http://trac.osgeo.org/osgeo4w/wiki/pkg-grass#Errata
https://trac.osgeo.org/grass/wiki/CompileOnWindows
https://trac.osgeo.org/grass/log/grass/branches/releasebranch_6_4/mswindows

I think it is fixed but the osgeo4w GRASS package is so far
out of date now & so untested..

Thanks for the suggestion and the link to the changeset. It
turns out I had
already made that change, having also discovered
grass64.bat after editing
grass.bat.

the osgeo4w installer adds a few extra layers of "grass.bat"s
on its own, some of which are created by the nsi scripts in
the mswindows/ dir of the source code.

That particular command was commented out in my version; I
tried un-commenting it but I still got the same error.

The relevant contents of my two batch files are:

C:\OSGeo4W\bin\grass64.bat
--------------------------
...
rem Path to your web browser
rem set
GRASS_HTML_BROWSER=%SYSTEMDRIVE%\PROGRA~1\INTERN~1\IEXPLORE.EXE
...

I also tried changing the above statement to:
set GRASS_HTML_BROWSER=%PROGRAMFILES%\Internet
Explorer\iexplore.exe

but I still got the same error.

C:\OSGeo4W\etc\ini\grass.bat
----------------------------
...
set GRASS_HTML_BROWSER=%PROGRAMFILES%\Internet
Explorer\iexplore
...

I can confirm that grass.bat is executed, but it also
appears to be
overridden by grass64.bat (I can tell because the g.manual
error contains
"iexplorer.exe" rather than just "iexplore").

fwiw, mswindows/GRASS-Installer.nsi in the source code sets
it to iexplore.exe

After some investigation I also found another copy of
grass64.bat at
C:\OSGeo4W\apps\grass\bin, however the second copy does not
appear to be
executed and is missing several statements.

The operation and purpose of all the batch files isn't
clear to me at the
moment but I will help where I can to diagnose the
problem.

try reading through the osgeo4w bug reports and changes linked
above, JEF has explained a bit how their setup works in those
tickets.

good luck,
Hamish

ps - I'll be offline and unable to help for a while

Frank Bilki wrote:

That worked! Thanks so much for the suggestion.

I experimented with combining the forward slashes and the full pathname with
spaces (e.g. C:/Program Files/Internet Explorer/iexplore) and that also
worked. So it seems the cause was using back-slashes instead of
forward-slashes.

I notice that the batch file contains a mixture of back- and
forward-slashes, e.g.:

set WINGISBASE=%OSGEO4W_ROOT%/apps/grass/grass-6.4.0svn
"%WINGISBASE%"\etc\init.bat %*

Is there a systematic rule for choosing which to use?

Anything that might be used by system() or from within a batch file
needs to use backslashes. The Windows command interpreter uses forward
slashes to indicate switches.

The rest of Windows accepts forward slashes.

OTOH, anything which needs to be used from within a Bourne-shell
script needs to use forward slashes. Also, the GRASS libraries tend to
assume forward slashes; some of this has been fixed, but probably not
all of it.

The issues with backslashes and spaces in filenames are a large part
of the reason that GRASS 7 has almost completely abandoned
Bourne-shell scripts in favour of Python.

--
Glynn Clements <glynn@gclements.plus.com>

On Sun, Jul 26, 2009 at 9:01 PM, Hamish<hamish_b@yahoo.com> wrote:

I think it is fixed but the osgeo4w GRASS package is so far
out of date now & so untested..

Is it possible to update the OSGeo4W installation using (say) the
WinGRASS-6.4.0RC5-1 setup, or would that just cause more problems than
it's worth?

As a test I followed the exact instructions described in the
'Installation' topic on
http://trac.osgeo.org/osgeo4w/wiki/pkg-grass#Errata using Google
Chrome instead Firefox, but as expected it didn't work with the
backslashes. Changing them to forward slashes worked perfectly.

It also doesn't seem to matter if the change is made in
C:\OSGeo4W\etc\ini\grass.bat or C:\OSGeo4W\bin\grass64.bat as long as
it is made in one of them.

Glynn Clements wrote:

Could anyone clarify which of the following are valid arguments to
GRASS_HTML_BROWSER?

1. A native filename, e.g.:

      C:\GRASS\docs\html\index.html

2. A Unix-ish filename, e.g.:

      C:/GRASS/docs/html/index.html

3. A file: URL, e.g.:

      file:///C:/GRASS/docs/html/index.html

After tinkering with this for a while on a couple different computers
(both using Vista and both with an OSGeo4W installation so not much of
a test really) I would say:

1. Invalid
2. Valid, even though it is Windows
3. Invalid (at least in terms of pointing to the default browser. Not
tested with html documents.)

Cheers,

Frank