[GRASS-dev] [GRASS GIS] #2372: GRASS 7 on windows starts with minimized CMD window

#2372: GRASS 7 on windows starts with minimized CMD window
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 7.0.0
Component: Startup | Version: svn-releasebranch70
Keywords: wingrass | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
This is an inverse bug of #1891

Steps to reproduce:
  * Install Wingrass on a clean machine (without previous GRASS 7 install
or just remove AppData/Roaming/GRASS7 folder)
  * Click on "GRASS GIS 7.0.0svn GUI" icon to launch GRASS
  * Observe how GRASS fails to start.

Actual behaviour - GRASS starts a minimized CMD window with a welcome
message and prompt "Press Enter to continue". Unless user notices
minimized CMD window and makes a correct guess to restore the window to
read any messages there, he waits forever for GRASS to start.

Expected behaviour - GRASS starts with normal (non-minimized) CMD window
thus allowing user to read the Welcome message and press Enter to launch
GUI.

I had a chance to observe how 20 persons were hit by this bug. Thus a
claim "it doesn't affect users" is not a valid one.

Tested on Wingrass 7.0.0 yesterdays nightly.

Setting as a blocker for 7.0 release, as 1) it is ruining the first
impression about GRASS GIS and 2) it is trivial to fix.

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

#2372: GRASS 7 on windows starts with minimized CMD window
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 7.0.0
Component: Startup | Version: svn-releasebranch70
Keywords: wingrass | Platform: MSWindows 8
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
Changes (by hellik):

  * priority: blocker => critical
  * platform: Unspecified => MSWindows 8

Comment:

Replying to [ticket:2372 marisn]:
>
> Setting as a blocker for 7.0 release, as 1) it is ruining the first
impression about GRASS GIS and 2) it is trivial to fix.

changing
[http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_7_0/mswindows
/GRASS-Installer.nsi.tmpl#L652 L652] may help:

''SW_SHOWMINIMIZED'' => ''SW_SHOWNORMAL''

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

#2372: GRASS 7 on windows starts with minimized CMD window
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 7.0.0
Component: Startup | Version: svn-releasebranch70
Keywords: wingrass | Platform: MSWindows 8
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by hellik):

Replying to [ticket:2372 marisn]:
> This is an inverse bug of #1891
>
> Steps to reproduce:
> * Install Wingrass on a clean machine (without previous GRASS 7 install
or just remove AppData/Roaming/GRASS7 folder)

mmmhhh, just thinking more about it:

after installing the winGRASS-standalone on a fresh box, there should be
the AppData/Roaming?/GRASS7-folder, because the winGRASS-standalone
installer should do it for you, see:

http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_7_0/mswindows
/GRASS-Installer.nsi.tmpl#L867

http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_7_0/mswindows
/GRASS-Installer.nsi.tmpl#L867

{{{
867 SetShellVarContext current
868 ${If} ${FileExists}
"$APPDATA\GRASS@GRASS_VERSION_MAJOR@\rc"
869 DetailPrint "File
$APPDATA\GRASS@GRASS_VERSION_MAJOR@\rc already exists. Skipping."
870 ${Else}
871 ;create $APPDATA\GRASS@GRASS_VERSION_MAJOR@\rc
872 ClearErrors
873 CreateDirectory
$APPDATA\GRASS@GRASS_VERSION_MAJOR@
874 FileOpen $0 $APPDATA\GRASS@GRASS_VERSION_MAJOR@\rc w
875 IfErrors done_create_grass_rc
876 FileWrite $0 'GISDBASE: $GIS_DATABASE$\r$\n'
877 FileWrite $0 'LOCATION_NAME: demolocation$\r$\n'
878 FileWrite $0 'MAPSET: PERMANENT$\r$\n'
879 FileClose $0
880 done_create_grass_rc:
881 ${EndIf}
}}}

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

#2372: GRASS 7 on windows starts with minimized CMD window
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 7.0.0
Component: Startup | Version: svn-releasebranch70
Keywords: wingrass | Platform: MSWindows 8
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by hellik):

Replying to [ticket:2372 marisn]:
> This is an inverse bug of #1891
>
> Steps to reproduce:
> * Install Wingrass on a clean machine (without previous GRASS 7 install
or just remove AppData/Roaming/GRASS7 folder)

please test/see if installing winGRASS7 standalone on a fresh box creates
for you AppData/Roaming/GRASS7 folder!

thanks

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

#2372: GRASS 7 on windows starts with minimized CMD window
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 7.0.0
Component: Startup | Version: svn-releasebranch70
Keywords: wingrass | Platform: MSWindows 8
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

Replying to [comment:3 hellik]:
> Replying to [ticket:2372 marisn]:
> > This is an inverse bug of #1891
> >
> > Steps to reproduce:
> > * Install Wingrass on a clean machine (without previous GRASS 7
install or just remove AppData/Roaming/GRASS7 folder)
>
> please test/see if installing winGRASS7 standalone on a fresh box
creates for you AppData/Roaming/GRASS7 folder!
>
> thanks

I didn't try it on 'clean' machine but I removed the GRASS7 folder and
demolocation in Documents/grassdata and everything was created and worked
fine for me.

Anna

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

#2372: GRASS 7 on windows starts with minimized CMD window
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 7.0.0
Component: Startup | Version: svn-releasebranch70
Keywords: wingrass | Platform: MSWindows 8
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by marisn):

Replying to [comment:3 hellik]:
> please test/see if installing winGRASS7 standalone on a fresh box
creates for you AppData/Roaming/GRASS7 folder!

Yes, it does. Still only for the user running the installer. I later
created a new user and there was no AppData/Roaming/GRASS7 folder with all
consequences. That explains why I observed it - in a computer lab
installations are done by the administrator but students are using their
normal user accounts. A small modification to the initial report, but it
is still valid.

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

#2372: GRASS 7 on windows starts with minimized CMD window
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 7.0.0
Component: Startup | Version: svn-releasebranch70
Keywords: wingrass | Platform: MSWindows 8
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by marisn):

Replying to [comment:4 annakrat]:
>
> I didn't try it on 'clean' machine but I removed the GRASS7 folder and
demolocation in Documents/grassdata and everything was created and worked
fine for me.
>
Actually having a minimized CMD window has another downside - GRASS is
printing error messages in the CMD window. Just observed with a new user -
no GRASS7 folder (see the previous comment), CMD window is minimized and
nothing happens - the reason: in the CMD is displayed an error message
"... python.exe cant open ... grass70.py: permission denied ..." (that is
the #2290) - still it displays why the simple proposal of Hellik in the
1st comment would be a good idea.

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

#2372: GRASS 7 on windows starts with minimized CMD window
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 7.0.0
Component: Startup | Version: svn-releasebranch70
Keywords: wingrass | Platform: MSWindows 8
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by hellik):

Replying to [comment:6 marisn]:
[...]
> - still it displays why the simple proposal of Hellik in the 1st
comment would be a good idea.

nsis-script: SW_SHOWMINIMIZED => SW_SHOWNORMAL (Ticket #2372);
description fix
r61277 trunk, r61278 relbranch 7

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

#2372: GRASS 7 on windows starts with minimized CMD window
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 7.0.0
Component: Startup | Version: svn-releasebranch70
Keywords: wingrass | Platform: MSWindows 8
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by hellik):

Replying to [comment:6 marisn]:
>still it displays why the simple proposal of Hellik in the 1st comment
would be a good idea.

closing the ticket? as by r61277 and r61278 CMD isn't minimized any more.

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

#2372: GRASS 7 on windows starts with minimized CMD window
--------------------------+-------------------------------------------------
  Reporter: marisn | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: critical | Milestone: 7.0.0
Component: Startup | Version: svn-releasebranch70
Resolution: fixed | Keywords: wingrass
  Platform: MSWindows 8 | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by marisn):

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

Comment:

Works as a charm. No more problems with multiple user accounts. Thank you!

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