[GRASS-dev] [GRASS GIS] #1891: wingrass: background dosbox from regular wxgui startup

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------
Hi,

after installing the latest 6.4.3svn nightly build on a Windows7 machine,
and double clicking on the new desktop icon to launch the wxGUI, there's
an empty dosbox just sitting there on the screen.

this is a regression from 6.4.2; ISTR that the place in the nsi installer
where the icons are created is where you can tell it to auto-minimize the
dosbox (you can also do it manually by right clicking on the "GRASS GIS
$ver" icon Properties and selecting minimize from a drop-down menu). But
really it should do like the tcl/tk GUI does from the Windows start menu
and just flash one up and then have it go away (and even then, telling the
one that flashes up to be minimized by default would be less
disconcerting/more professional than seeing a black box blink by).

thanks,
Hamish

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

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------
Changes (by hamish):

  * priority: blocker => major

Comment:

this is unsightly, but not a really a blocker.

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

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by neteler):

Tested on Windows8: the black dosbox also here and no command line (maybe
not released
but stuck? Or it should be minimized). When entering CTRL-C in this box,
it ask if
to interrupt a batch job. Confirming that, the GRASS session ends.

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

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hellik):

Replying to [comment:2 neteler]:
> Tested on Windows8: the black dosbox also here and no command line
(maybe not released
> but stuck?

see http://trac.osgeo.org/grass/ticket/1103

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

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by neteler):

Replying to [comment:2 neteler]:
> Tested on Windows8: the black dosbox also here and no command line

I seem to understand:
  * sometimes messages are printed in this black dosbox, no other
functionality (hence it should just be minimized perhaps)
  * if you want command line, use the MSYS startup procedure

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

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hamish):

see also the SW_SHOWMINIMIZED vs. SW_SHOWNORMAL in the icon setup in
mswindows/GRASS-Installer.nsi.tmpl.

(maybe you can right click properties or edit the .lnk shortcuts to try
different values?)

I suspect if error messages do show up in there, the window will close
before you could read them. ? I'm not sure, would have to try old copies
of the installer, but I think this extra window is new behavior. ?

Hamish

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

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hellik):

Replying to [comment:4 neteler]:
> Replying to [comment:2 neteler]:
> > Tested on Windows8: the black dosbox also here and no command line

see
http://trac.osgeo.org/grass/ticket/1891?replyto=4#comment:3

any idea to get this running

> I seem to understand:
> * sometimes messages are printed in this black dosbox, no other
functionality (hence it should just be minimized perhaps)
> * if you want command line, use the MSYS startup procedure

IMHO we should get rid of the MSYS-commandline and only use the windows-
CMD, it already works in winGRASS7 in this way.

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

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hamish):

Replying to [comment:6 hellik]:
> IMHO we should get rid of the MSYS-commandline and only use the windows-
CMD,
> it already works in winGRASS7 in this way.

-1

thanks,
Hamish

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

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by glynn):

Replying to [comment:6 hellik]:

> IMHO we should get rid of the MSYS-commandline and only use the windows-
CMD, it already works in winGRASS7 in this way.

As GRASS 6.x requires bash, the user should be given the option to launch
a session using bash instead of cmd.exe. Either shell should be run using
the Windows console; MSys' rxvt is quite buggy and isn't compatible with
pdcurses.

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

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hellik):

Replying to [comment:8 glynn]:
> Replying to [comment:6 hellik]:
>
> > IMHO we should get rid of the MSYS-commandline and only use the
windows-CMD, it already works in winGRASS7 in this way.
>
> As GRASS 6.x requires bash, the user should be given the option to
launch a session using bash instead of cmd.exe. Either shell should be run
using the Windows console; MSys' rxvt is quite buggy and isn't compatible
with pdcurses.

thanks for clarification of my bad description, of course I've meant rxvt.

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

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hamish):

Hi,

see also #1103, this one is a semi-duplicate ticket.

after a little hunting, I notice the tooltip for the start wxGUI is
"Launch GRASS ${VERSION_NUMBER} with wxGUI and CMD console", but since
then the CMD console was switched off in favor of GUI-only mode, so the
comment is a little out of date. maybe the empty window is more hangover
effect?

You can right click on the grass65svn.bat shortcut and go to Properties ->
Shortcut Tab -> Run: and change to "Minimized", but I wonder why
SW_SHOWMINIMIZED from the CreateShortCut in GRASS-Installer.nsi.tmpl is
not always respected? Maybe if you click on the taskbar button for it it
remembers the last-used state instead of the installer's original state?

... is there a way in windows to run a .bat file without opening a dos
box?

Hamish

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

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by glynn):

Replying to [comment:10 hamish]:

> ... is there a way in windows to run a .bat file without opening a dos
box?

AFAICT, if you execute a console program (such as cmd.exe) via Explorer,
the console is shown automatically (although you can configure it to
minimise the console).

You can execute a .bat file from another program without the console being
shown. E.g. if the Python script:
{{{
import subprocess
subprocess.call('test.bat', shell=True)
}}}
is given a .pyw extension, running the .pyw file via Explorer will execute
the .bat file without a console being shown.

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

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hamish):

> Replying to [comment:10 hamish]:
> > ... is there a way in windows to run a .bat file without opening a dos
box?

Replying to [comment:11 glynn]:
> AFAICT, if you execute a console program (such as cmd.exe) via Explorer,
the
> console is shown automatically (although you can configure it to
minimise
> the console).

which is what we've done, but if you unminimize it it seems to remember
that state for next time(?). at least with Windows7 the taskbar buttons
gets grouped so it's less obvious there.

> You can execute a .bat file from another program without the console
being
> shown. E.g. if the Python script:
> {{{
> import subprocess
> subprocess.call('test.bat', shell=True)
> }}}
> is given a .pyw extension, running the .pyw file via Explorer will
execute
> the .bat file without a console being shown.

(ok; & so run by pythonw.exe not python.exe)

This is for the main grass64svn.bat Init script, which also needs to do
-text and -tcltk without a working python, so I suspect it's more trouble
that it's worth. Another alternative to get rid of it might be a tiny C
program to launch the .bat file..

here's a similar solution using a .vbs wrapper:
   http://www.tomshardware.com/forum/245566-45-batch-file-window-poping

Perhaps in grass7 where the startup script is a .py it's simpler to do the
.pyw wrapper?

Hamish

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

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hamish):

hopefully with r55886 the dos box is now minimized when grass is launched
from the desktop icon (devbr6).

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

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hellik):

Replying to [comment:13 hamish]:
> hopefully with r55886 the dos box is now minimized when grass is
launched from the desktop icon (devbr6).

r55888 - grass/trunk/mswindows
cmd terminal was removed so remove it from the tooltip; minimize the dos
box (merge from devbr6)

why in wingrass7? CMD terminal is usable there...

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

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hellik):

Replying to [comment:14 hellik]:
> why in wingrass7? CMD terminal is usable there...

as example see here:
http://grasswiki.osgeo.org/wiki/R_statistics#GRASS_7_Usage

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

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hamish):

Replying to [comment:14 hellik]:
> why in wingrass7? CMD terminal is usable there...

ok, I didn't know that, happy to switch it back for g7.

I thought whoever switched off the CMD window in 6.x wingrass did it
because the command line was considered "scary" to Windows users, not to
hide something that wasn't usable. (I don't really have a strong opinion
either way on what should be the default, power users can always copy
their favorite grass-startup-mode icon to the desktop, just that it would
be nice if the help page examples were easy to cut and paste somewhere,
and "just work")

?,
Hamish

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

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hamish):

It's beginning to dawn on me that the subject of this bug report may be
due to a bug, there's a GRASS> prompt in that batch file trying to get
out; and not the result of an intentional change... in which case my last
commit minimizing the dos box was wrong.

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

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hamish):

and by "subject of this bug report" I mean the subject of #1103 WinGrass64
- windows-commandline not released ...

ok, that's me signing off for the night :slight_smile:

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

#1891: wingrass: background dosbox from regular wxgui startup
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hellik):

Replying to [comment:16 hamish]:
> Replying to [comment:14 hellik]:
> > why in wingrass7? CMD terminal is usable there...
>
> ok, I didn't know that, happy to switch it back for g7.

yes please, thanks.

>
> I thought whoever switched off the CMD window in 6.x wingrass did it
because the command line was considered "scary" to Windows users, not to
hide something that wasn't usable.

the latter

(I don't really have a strong opinion either way on what should be the
default, power users can always copy their favorite grass-startup-mode
icon to the desktop, just that it would be nice if the help page examples
were easy to cut and paste somewhere, and "just work")

help page examples can be copied/pasted in the windows CMD, I vote for
"with CMD" as default

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