[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: major | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hellik):

Replying to [comment:17 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;

maybe yes

>and not the result of an intentional change... in which case my last
commit >minimizing the dos box was wrong.

yes, if #1103 could be fixed

Helmut

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1891#comment:20&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 mlennert):

Replying to [comment:19 hellik]:
> Replying to [comment:16 hamish]:

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

+1

Moritz

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1891#comment:21&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:19 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.

done

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1891#comment:22&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):

in light of this r55908 and r55889 should be reverted.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1891#comment:23&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):

any more votes/comments/objections before spending time on getting the
grass terminal working again? so far we have two +1s and my +0.

should we keep it running DOS, or try for bash-in-a-dos-box before
release?

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1891#comment:24&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:24 hamish]:
> any more votes/comments/objections before spending time on getting the
grass terminal working again? so far we have two +1s and my +0.
>
> should we keep it running DOS, or try for bash-in-a-dos-box before
release?

see

#1891#comment:8

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1891#comment:25&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):

I don't think we should consider getting rid the rxvt + msys command line
until the cmd.exe + bash actually works. We can revisit the issue once it
does.

Fixing a couple of things in init.bat yesterday it was apparent that the
:wxpython gui goto target in init.bat is currently written to launch the
wxGUI without a real command window, so an intentional change. I don't say
that is right or wrong, just fyi the way it currently is written.

Hamish

ps- I suggest we create a new sub-menu in the Start->Program Files->GRASS
menu, to contain the lesser used startup methods (command line only,
tcl/tk gui, ...), as it's a bit cluttered right now. I'm not sure where
the MSYS UNIX-only one should go, maybe into another Utilities menu?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1891#comment:26&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:24 hamish]:

> should we keep it running DOS, or try for bash-in-a-dos-box before
release?

The last version of Windows to include a version of DOS was Windows ME.
cmd.exe is not DOS, and the command-line utilities are not DOS programs,
even if they are largely compatible with the original DOS programs with
the same names.

Ideally, GRASS 6.x should include options to start a GRASS session:
a) using cmd.exe in a console window, and
b) using bash in a console window.
It shouldn't include any options which involve MSys' rxvt, as it's just
too buggy (and won't work with any curses-based programs, which require a
normal console window).

Windows users shouldn't be expected to be familiar with bash.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1891#comment:27&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 mmetz):

Replying to [comment:27 glynn]:
> Replying to [comment:24 hamish]:
>
> > should we keep it running DOS, or try for bash-in-a-dos-box before
release?
>
>
> Ideally, GRASS 6.x should include options to start a GRASS session:
> a) using cmd.exe in a console window, and
> b) using bash in a console window.

+1

> It shouldn't include any options which involve MSys' rxvt, as it's just
too buggy (and won't work with any curses-based programs, which require a
normal console window).

FWIW, MSYS uses (since 2009.03.17) by default sh, not rxvt. Only the
ancient msys.bat in GRASS 6 uses rxvt by default. The MSYS console in
GRASS 7 uses sh.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1891#comment:28&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:28 mmetz]:
> FWIW, MSYS uses (since 2009.03.17) by default sh, not rxvt. Only the
ancient
> msys.bat in GRASS 6 uses rxvt by default. The MSYS console in GRASS 7
uses sh.

... rxvt is the xterm-alike window-frame, sh is the Bourne shell
(#!/bin/sh, in the case of MSys "symlinked" to bash.exe), right? are we
comparing apples and oranges? or is there another sh.exe from Microsoft or
MSys acting as a graphical xterm-alike window and not a Bourne shell
interpreter?

either way, let's not start anything new and delay 6.4.3 for a
transition/debugging, it can go in for the next one. Besides the known
pdcurses issue (I've used the msys+rxvt a bunch and it's hasn't bothered
me) the rxvt-MSys on 6.4.3svn is the least problematic of the startup
methods on wingrass right now. It ain't (very) broke, let's not fix it
while cmd.exe and friends are actively being transitioned from mostly-
broken to hopefully-working.

for the 6.4.3 release right now we offer these options:
  - Command Line (grass in C:\>, just fixed in devbr6; will backport
v.soon)
  - GUI (wxGUI without a separate command window; sibling to the desktop
icon)
  - GUI with MSYS (wxGUI with bash running in a rxvt window)
  - Old TclTk GUI (no rxvt window, just the GUI windows(?))
  - MSYS UNIX Console (bash in rxvt, not in a GRASS environment)

the desktop icon is not exactly the same as the "GUI" from the menu, but
AFAIK the only difference is the minimizing of the empty dosbox window.
Whatever the desktop icon is effectively defines the "default"
presentation.

grass643.bat in the 'C:\Program Files\GRASS GIS' dir calls etc/env.bat
then etc/Init.bat for the startup, with the exception of "GUI+MSys" which
calls "./msys/msys.exe grass643.sh -wx".

I'm sort of confused as to the goal we are working towards-

  - which of the options do we want the "default" presentation to be?
  - otherwise are we happy with: cmd.exe only, GUI only, and GUI+bash?
  - if the answer to the first question is GUI+bash, will bash be in rxvt
for 6.4.3 and a dosbox for 6.4.4? or some other plan?
  - if for 6.4.3 the "default" desktop icon target is GUI-only, do we write
a simple .pyw wrapper to call 'grass643svn.bat -wxpython' launcher to
avoid the empty dosbox? (the subject of this ticket)
  - do we ease the non-default startup options into a sub-menu to reduce
the clutter? or just let the user adjust the desktop icon to whichever
version they like?

thanks,
Hamish

ps- is the occasional unwanted "C:" -> "/c/" conversions in random strings
by msys still a problem in trunk?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1891#comment:29&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 mmetz):

Replying to [comment:29 hamish]:
> Replying to [comment:28 mmetz]:
> > FWIW, MSYS uses (since 2009.03.17) by default sh, not rxvt. Only the
ancient
> > msys.bat in GRASS 6 uses rxvt by default. The MSYS console in GRASS 7
uses sh.
>
> ... rxvt is the xterm-alike window-frame, sh is the Bourne shell
(#!/bin/sh, in the case of MSys "symlinked" to bash.exe), right? are we
comparing apples and oranges? or is there another sh.exe from Microsoft or
MSys acting as a graphical xterm-alike window and not a Bourne shell
interpreter?

You do not need rxvt to offer bash in a console window. The MSYS console
window does not use rxvt by default as of 2009.03.17.
>
>
> either way, let's not start anything new

Having been the default for 4 years means "new"? Because of the problems
with rxvt, I have been using the official MSYS default (cmd.exe + sh.exe)
for the last few years in my on wingrass versions as of 6.4.1.

Markus M

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1891#comment:30&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:29 hamish]:

> > FWIW, MSYS uses (since 2009.03.17) by default sh, not rxvt. Only the
ancient
> > msys.bat in GRASS 6 uses rxvt by default. The MSYS console in GRASS 7
uses sh.
>
> ... rxvt is the xterm-alike window-frame, sh is the Bourne shell
(#!/bin/sh, in the case of MSys "symlinked" to bash.exe), right?

Right. bash.exe (aka sh.exe aka /bin/sh) and cmd.exe are shells: programs
which read commands from stdin and execute them. rxvt and "the console
window" (conhost.exe) are terminal emulators.

The two are orthogonal: you can run either shell in either terminal
emulator.

We should offer a choice of shell: bash is more functional, but there's no
reason to expect Windows users to be familiar with it. There's no reason
to offer a choice of terminal emulator; the one which is built into
Windows is more robust and more functional (apart from anything else,
programs will actually recognise it as a terminal; the isatty() function
returns true for the built-in console window and false for anything else,
including rxvt).

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1891#comment:31&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,

rxvt is nothing to do with this bug beyond that's the only 6.x shell which
is currently working (mostly) problem free. I've opened #1950 for further
discussion on replacing it.

---
the task in this ticket is to decide if the GUI without a real terminal
window is what we want as the default, or not, and if so consider to
replace the grass643.bat file created by the NSIS installer with a new
grass643.pyw. (the .bat is just a 4 liner which sources env.bat (itself
just 13 setenv()s) and launches Init.bat, should be easy)

... or if we just continue to live with the minimized empty dosbox in the
taskbar.

thanks,
Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1891#comment:32&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:32 hamish]:

> rxvt is nothing to do with this bug beyond that's the only 6.x shell

rxvt isn't any kind of shell.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1891#comment:33&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):

outstanding issues:

  * to write a .pyw wrapper for wingrass startup?
  * which is the desired default startup method? the discussion in this
ticket is in conflict with the current implementation.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1891#comment:34&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):

The current nightly winGRASS 6.4.3svn no longer starts:

  * wx GUI start broken- flash of dosbox only
  * old tcltk start broken - nothing happens
  * cmd mode start broken - nothing happens

Only the MSYS start is functional. I don't know if this is the right
ticket but it is BAD to break everything in after RC3.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1891#comment:35&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: blocker | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------
Changes (by neteler):

  * priority: major => blocker

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1891#comment:36&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: blocker | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hellik):

Replying to [comment:35 neteler]:
> The current nightly winGRASS 6.4.3svn no longer starts:
>
> * wx GUI start broken- flash of dosbox only
> * old tcltk start broken - nothing happens
> * cmd mode start broken - nothing happens
>
> Only the MSYS start is functional. I don't know if this is the right
> ticket but it is BAD to break everything in after RC3.

wingrass standalone or osgeo4w-wingrass?

tested here with

{{{
GRASS version: 6.4.3svn
GRASS SVN Revision: 56101
GIS Library Revision: 50937 (2012-02-25)
GDAL/OGR: 1.9.2
PROJ4: Rel. 4.8.0, 6 March 2012
Python: 2.7.4
wxPython: 2.8.12.1
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)
}}}

[can't test standalone cause of a nasty dll hell - aka interfering
installed python vs. bundled python]

Helmut

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1891#comment:37&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: blocker | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hamish):

Replying to [comment:35 neteler]:
> The current nightly winGRASS 6.4.3svn no longer starts:
>
> * wx GUI start broken- flash of dosbox only
> * old tcltk start broken - nothing happens
> * cmd mode start broken - nothing happens
>
> Only the MSYS start is functional. I don't know if this is the right
> ticket but it is BAD to break everything in after RC3.

the three you see not working start with init.bat; the msys startup is
different, it uses like 'msys.bat -c init.sh' (not exactly that, but in
effect).

I've just tried again on XP with the r56101 nightly pkg build of 6.4.3svn,
everything works fine for me.

  - ''did you select the box for installing "Important Microsoft runtime
dll's"''? (again, if not selected I suspect we need an extra warning
installer page with [<Back<] [>Forward>] buttons to give the user a
second opportunity to select it)

  - can you recreate from the command line to see the error message? right-
click on the menu item, look at the properties to get startup dir and
command name, open a dosbox, cd into the startup dir and paste in the
startup command.

  - the only recent change to relbr64's init.bat is r56104. (which works
fine for me, and should not affect the wxGUI startup at all, so I'm
doubtful it's the cause)

or maybe there is some other dll missing. You're not using some exotic
C:\Program Files\ or Docs & Settings install location?

Helmut wrote:
> [can't test standalone cause of a nasty dll hell - aka interfering
installed
> python vs. bundled python]

at install time or run time? You should be able to change GRASS_PYTHON to
the exact c:\path\python.exe you want to use in %GISBASE%/etc/env.bat.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1891#comment:38&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: blocker | Milestone: 6.4.3
Component: Default | Version: svn-releasebranch64
Keywords: wingrass | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by hamish):

Replying to [comment:38 hamish]:
> I've just tried again on XP with the r56101 nightly pkg build of
6.4.3svn,
> everything works fine for me.
...
> - the only recent change to relbr64's init.bat is r56104.

(which of course is newer than the installer, so not responsible. The
prior change to that was r55971, 11 days ago, which is an important fix)

Hamish

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