[GRASS-dev] [GRASS GIS] #499: fresh windows startup not very friendly

#499: fresh windows startup not very friendly
------------------------------+---------------------------------------------
Reporter: hamish | Owner: grass-dev@lists.osgeo.org
     Type: enhancement | Status: new
Priority: major | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Keywords: wingrass startup | Platform: MSWindows XP
      Cpu: x86-32 |
------------------------------+---------------------------------------------
Hi,

after a brand new OSGeo4W install on XP, the user gets a nice GRASS icon
to double click on.

when they click it though they get a system error beep, and a DOS box
error which says:
{{{
access: Invalid arguement
ERROR: LOCATION << C:"/UNKNOWN >> not available
}}}

then the Tcl/Tk startup window opens and a Tk Error window box pops up
saying
{{{
Warning: Invalid database. Finding first valid directory in parent tree
}}}

then another:
{{{
Warning: location <<UNKNOWN>> at GISDBASE <C:> is not a directory or does
not exist
}}}

not a very warm welcome!

Even then there is no way to create a new GISDBASE dir from the startup
GUI. you have to exit GRASS, go into the file manager, create
C:\Docs&settings\Username\grassdata manually then restart (same beeps and
errors again) and select it. +you have to know to do that!

Maybe add a link to Lorenzo's new-user getting started tutorial?
http://grass.bologna.enea.it/tutorial/01-tutorial/

I suggest if .grassrc6 is missing to pop up a GUI asking to browse for the
data directory, or give an option to create a new one.
With a big blinking red [Help] button along side it.

thanks,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/499&gt;
GRASS GIS <http://grass.osgeo.org>

#499: fresh windows startup not very friendly
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: trivial | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: wingrass startup
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Changes (by marisn):

  * priority: major => trivial

Comment:

It's designed to be hard :wink:
Tcl/Tk GUI doesn't check presence of .grassrc6 or any other file. Location
UNKNOWN is set by init.sh on *nix and GUI just notes user about it's
absence. Probably it would be better to remove completely presetting
location etc. in init scripts, still then it may need to make some changes
also in text based startup screen.
As goes for GISDBASE creation, I will take a look into this problem later
this weekend.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/499#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#499: fresh windows startup not very friendly
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: wingrass startup
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Changes (by hamish):

  * priority: trivial => major

Comment:

> It's designed to be hard :wink:

I know you are just kidding, but even so I don't think that's an
acceptable excuse.

not dumbing things down is one thing. keeping it difficult on purpose is
another.

> Tcl/Tk GUI doesn't check presence of .grassrc6 or any other file.

my wish is that it should check for that, and if it isn't found it should
pop up a file system browse window to help you choose/create the $GISDBASE
dir.

> Probably it would be better to remove completely presetting
> location etc. in init scripts

no way, that's super useful. just deal with the lack of .grassrc6
gracefully, that's all.

> As goes for GISDBASE creation, I will take a look into this
> problem later this weekend.

thanks.

I'm bumping the priority higher again as I think this is really very
important. I have spread some links to Lorenzo's nice first time user
tutorial, which may help.

cheers,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/499#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#499: fresh windows startup not very friendly
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: wingrass startup
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Changes (by marisn):

  * priority: major => minor

Comment:

Replying to [comment:2 hamish]:
> > Tcl/Tk GUI doesn't check presence of .grassrc6 or any other file.
>
> my wish is that it should check for that, and if it isn't found it
should pop up a file system browse window to help you choose/create the
$GISDBASE dir.
Sorry, I was wrong. Actual startup goes like this:
  * init.sh checks presence of .grassrc6 or whatever it's called for
current version
  * if there is no one, it creates one with GISDBASE=pwd, '<UNKNOWN>'
location etc.
  * gis_set.tcl searches for .grassrc6 file and parses it
  * after parsing rc file, it validates GISDBASE, location and mapset. As
'<UNKNOWN>' most likely will not be valid location in current directory,
validation procedure displays a warning.
>
> > Probably it would be better to remove completely presetting
> > location etc. in init scripts
>
> no way, that's super useful. just deal with the lack of .grassrc6
gracefully, that's all.
Can You, please, explain usefullines of .grassrc6 file with location
<UNKNOWN> and mapset <UNKNOWN>?
>
> > As goes for GISDBASE creation, I will take a look into this
> > problem later this weekend.
>
> thanks.
Would r35911 make things better? svn up Your develbranch, rm .grassrc6 and
start GRASS. If it's OK, merge to release branch.
Still it may be a good idea to set GISDBASE for first run to user home dir
on windows. Still I have no idea how to do that. And will it work safe
with spaces in path? Do we have windows gurus here? Hamish? Patches
welcome :slight_smile:

Not RTFMing is not a major GRASS issue. It's PEBKAC. And if windows
doesn't provide multitasking feature (ability to switch to other
application to create simple folder) then is it worth to run GRASS there?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/499#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#499: fresh windows startup not very friendly
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: wingrass startup
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by marisn):

It should be r35991. Sorry for typo.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/499#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#499: fresh windows startup not very friendly
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: wingrass startup
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by hamish):

Maris:
> > > Probably it would be better to remove completely presetting
> > > location etc. in init scripts
Hamish:
> > no way, that's super useful. just deal with the lack of
> > .grassrc6 gracefully, that's all.
Maris:
> Can You, please, explain usefullines of .grassrc6 file with
> location <UNKNOWN> and mapset <UNKNOWN>?

I thought you meant to remove saving the last mapset etc in .grassrcX.
nevermind. None the less, having <UNKNOWN> is a clear indicator of what is
missing. More so than just a missing entry; it helps with debugging.

> Would r35991 make things better?

yes, it is nice, thank you.

> Still it may be a good idea to set GISDBASE for first run to
> user home dir on windows. Still I have no idea how to do that.

me neither but a web search suggests that putting %HOMEPATH% into init.bat
instead of %CD% might be the way. If doing that, probably sync init.sh to
use $HOME instead of $PWD.

> And will it work safe with spaces in path?

no idea.

> Do we have windows gurus here? Hamish?

not me.

> Not RTFMing is not a major GRASS issue.

... grass has 500+ FMs to read, and for many users they are in a foreign
language. Launching the program should not require hours of study. A smart
user should be able to figure out how to render a map in <10 minutes. If
they can't see that tangible feedback many will just give up and walk
away.

> It's PEBKAC.

what I am saying is that unintuitive behaviour is a mistake by the
developers, not the users.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/499#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#499: fresh windows startup not very friendly
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: wingrass startup
  Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Changes (by marisn):

  * cpu: x86-32 => Unspecified

Comment:

I changed initial GISDBASE to user home directory (r36056). Needs testing
on Windows. If it's OK, recent changes need to be merged to release
branch.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/499#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#499: fresh windows startup not very friendly
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: wingrass startup
  Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by neteler):

Done in r36060 to receive more testing.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/499#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#499: fresh windows startup not very friendly
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: wingrass startup
  Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hamish):

Great,

FWIW here's a post detailing the differences between %HOMEPATH% vs
%USERPROFILE%, etc:
   http://www.mail-archive.com/bug-cvs@gnu.org/msg05565.html

still todo:
  - test latest patches on Windows
  - port new helpful hello message to wyPython (mostly for grass7; because
the default for grass6 is tcltk, if .grassrc6 is missing it will never try
and start the wxPy startup gui unless you specifically start from the cmd
line with -wxpython)

and, 1/2 the initial reason for this bug report:
  - init.bat does no handle UNKNOWN cleanly ("access )
  (init.sh understands what it means and tests for it though).

starting "grass64 -wxpython" at the osgeo4w dos shell gives a similar
error (and a loud beep):
{{{
access: Invalid arguement
ERROR: LOCATION << C:"/Docs and Settings/user/Desktop/<UNKNOWN>
     >> not available
}}}

ah, I found it. Init.bat was calling clean_temp unconditionally, and
that's what is giving the error. Patch on its way....

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/499#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>

#499: fresh windows startup not very friendly
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: wingrass startup
  Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hamish):

beeping/access error hopefully fixed with r36061.

TODO: (ie I can't do it)
   - test -> backport to other branches
   - port new helpful hello message to wyPython

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/499#comment:9&gt;
GRASS GIS <http://grass.osgeo.org>

#499: fresh windows startup not very friendly
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: wingrass startup
  Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by martinl):

Replying to [comment:8 hamish]:
> - port new helpful hello message to wyPython (mostly for grass7;
because the default for grass6 is tcltk, if .grassrc6 is missing it will
never try and start the wxPy startup gui unless you specifically start
from the cmd line with -wxpython)

Not sure if it's really needed. wxGUI starts without problem even if
.grassrc is missing.

Martin

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/499#comment:10&gt;
GRASS GIS <http://grass.osgeo.org>

#499: fresh windows startup not very friendly
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: wingrass startup
  Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hamish):

Replying to [comment:10 martinl]:
> Not sure if it's really needed. wxGUI starts without problem
> even if .grassrc is missing.

true, but the new user is left in a "ummm, now what?" situation faced with
a screen full of controls. It is not so bad I guess, "GIS data directory"
is the first item they come to.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/499#comment:11&gt;
GRASS GIS <http://grass.osgeo.org>

#499: fresh windows startup not very friendly
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: wingrass startup
  Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hamish):

init.bat stuff ported to releasebranch_6_4 and trunk in r36070 and r36071.

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/499#comment:12&gt;
GRASS GIS <http://grass.osgeo.org>

#499: fresh windows startup not very friendly
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: closed
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: fixed | Keywords: wingrass startup
  Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Changes (by hamish):

  * status: new => closed
  * resolution: => fixed

Comment:

tested & working in 6.4.0rc4 native wingrass installer. closing bug.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/499#comment:13&gt;
GRASS GIS <http://grass.osgeo.org>