[GRASS-dev] [GRASS GIS] #339: d.mon doesn't work (WinGrass commandline)

#339: d.mon doesn't work (WinGrass commandline)
-------------------------+--------------------------------------------------
Reporter: schulzea | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: default | Version: 6.3.0 RCs
Keywords: | Platform: MSWindows XP
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
I have installed WinGrass 6.3.0-4 on WindowsXP SP3.
I used the windows installer.
When I start WinGrass via command line, I can't open the monitor (d.mon
start=x0).
The following error messages appear:

ERROR: no such monitor 'x0'
ERROR: No such monitor as 'x0'
Problem selecting x0. Will try once more
ERROR: No such monitor as 'x0'

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

#339: d.mon doesn't work (WinGrass commandline)
---------------------------+------------------------------------------------
  Reporter: schulzea | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.3.0 RCs
Resolution: | Keywords:
  Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hamish):

X monitors do not exist in native MS windows. You must use the GUI or
install the cygwin version.

Perhaps an #ifdef could be added to d.mon so the module reports something
to this effect rather than leave the user confused.

Hamish

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

#339: d.mon doesn't work (WinGrass commandline)
---------------------------+------------------------------------------------
  Reporter: schulzea | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.3.0 RCs
Resolution: | Keywords:
  Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by schulzea):

okay, not so nice.
Are there plans to include x monitors in WinGrass or is this not possible?

It is pretty annoying to run the script under WinGrass commandline and
then have to change to WinGrass GUI to see the results.
Or is there a possibility to use the shell in the GUI-version

Alex

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

#339: d.mon doesn't work (WinGrass commandline)
---------------------------+------------------------------------------------
  Reporter: schulzea | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.3.0 RCs
Resolution: | Keywords:
  Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by glynn):

Replying to [comment:2 schulzea]:

> okay, not so nice.
> Are there plans to include x monitors in WinGrass or is this not
possible?

We never managed to figure out how to create a socket which works with
read() and write(), and changing the code to use Windows-specific
equivalents was too much work. In 7.0, monitors have been removed
entirely.

> It is pretty annoying to run the script under WinGrass commandline and
then have to change to WinGrass GUI to see the results.
> Or is there a possibility to use the shell in the GUI-version

You should be able to start a command-line session then start the GUI with
g.gui. Or look for an image viewer which has an option to automatically
re-load the file if it is modified, and use it to view the map.png file
created by d.* commands.

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

#339: d.mon doesn't work (WinGrass commandline)
---------------------------+------------------------------------------------
  Reporter: schulzea | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.3.0 RCs
Resolution: fixed | Keywords:
  Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Changes (by schulzea):

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

Comment:

okay, thanks for your help.
So I will close the ticket.

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

#339: d.mon doesn't work (WinGrass commandline)
---------------------------+------------------------------------------------
  Reporter: schulzea | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.3.0 RCs
Resolution: fixed | Keywords:
  Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by glynn):

Replying to [comment:1 hamish]:
> X monitors do not exist in native MS windows. You must use the GUI or
install the cygwin version.
>
> Perhaps an #ifdef could be added to d.mon so the module reports
something to this effect rather than leave the user confused.

It might be better to just omit d.mon on Windows. The program itself
compiles fine, but as none of the drivers exist, there isn't much point in
d.mon existing.

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

#339: d.mon doesn't work (WinGrass commandline)
---------------------------+------------------------------------------------
  Reporter: schulzea | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.3.0 RCs
Resolution: fixed | Keywords:
  Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hamish):

Replying to [comment:5 glynn]:
> Replying to [comment:1 hamish]:
> > X monitors do not exist in native MS windows. You must use the GUI or
install the cygwin version.
> >
> > Perhaps an #ifdef could be added to d.mon so the module reports
something to this effect rather than leave the user confused.
>
> It might be better to just omit d.mon on Windows. The program itself
compiles fine, but as none of the drivers exist, there isn't much point in
d.mon existing.

d.mon is used in a number of scripts (+user; +addon; but most importantly
in my eyes d.out.file), and it would be much kinder to users to have a
G_fatal_error("This module does not work in WinGRASS") or such [+exit(1)],
rather than some cryptic msys message that some command was not found half
way through the script that calls it. Followed by the inevitable FAQ post
to the mailing list asking where to find it.
(I am thinking of WinGRASS 6.4.0 here)

Hamish

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

#339: d.mon doesn't work (WinGrass commandline)
---------------------------+------------------------------------------------
  Reporter: schulzea | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.3.0 RCs
Resolution: fixed | Keywords:
  Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hamish):

Does "d.mon -l" work in WinGRASS? (ie does it show an empty list or fail
with a socket error?)

Hamish

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

#339: d.mon doesn't work (WinGrass commandline)
---------------------------+------------------------------------------------
  Reporter: schulzea | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.3.0 RCs
Resolution: fixed | Keywords:
  Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by pkelly):

It shows:

      no known monitors

Are you getting at that scripts using "d.mon start=x0" should run d.mon -l
first to check that x0 is available? Sounds very reasonable.

Paul

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

#339: d.mon doesn't work (WinGrass commandline)
---------------------------+------------------------------------------------
  Reporter: schulzea | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.3.0 RCs
Resolution: fixed | Keywords:
  Platform: MSWindows XP | Cpu: Unspecified
---------------------------+------------------------------------------------
Comment (by hamish):

Replying to [comment:8 pkelly]:
> Are you getting at that scripts using "d.mon start=x0" should run
> d.mon -l first to check that x0 is available? Sounds very
> reasonable.

most of them already check one of d.mon -p -l -L

Hamish

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