Opened 11 years ago

Closed 11 years ago

#499 closed enhancement (fixed)

fresh windows startup not very friendly

Reported by: hamish Owned by: grass-dev@…
Priority: minor Milestone: 6.4.0
Component: Default Version: 6.4.0 RCs
Keywords: wingrass startup Cc:
CPU: Unspecified Platform: MSWindows XP

Description

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

Change History (13)

comment:1 Changed 11 years ago by marisn

Priority: majortrivial

It's designed to be hard ;) 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.

comment:2 Changed 11 years ago by hamish

Priority: trivialmajor

It's designed to be hard ;)

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

comment:3 in reply to:  2 ; Changed 11 years ago by marisn

Priority: majorminor

Replying to 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 :)

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?

comment:4 Changed 11 years ago by marisn

It should be r35991. Sorry for typo.

comment:5 in reply to:  3 Changed 11 years ago 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

comment:6 Changed 11 years ago by marisn

CPU: x86-32Unspecified

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.

comment:7 Changed 11 years ago by neteler

Done in r36060 to receive more testing.

comment:8 Changed 11 years ago 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

comment:9 Changed 11 years ago 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

comment:10 in reply to:  8 ; Changed 11 years ago by martinl

Replying to 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

comment:11 in reply to:  10 Changed 11 years ago by hamish

Replying to 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

comment:12 Changed 11 years ago by hamish

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

Hamish

comment:13 Changed 11 years ago by hamish

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.