Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#339 closed defect (fixed)

d.mon doesn't work (WinGrass commandline)

Reported by: schulzea Owned by: grass-dev@…
Priority: major Milestone: 6.4.0
Component: Default Version: 6.3.0 RCs
Keywords: Cc:
CPU: Unspecified Platform: MSWindows XP

Description

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'

Change History (9)

comment:1 by hamish, 16 years ago

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

comment:2 by schulzea, 16 years ago

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

in reply to:  2 comment:3 by glynn, 16 years ago

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

comment:4 by schulzea, 16 years ago

Resolution: fixed
Status: newclosed

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

in reply to:  1 ; comment:5 by glynn, 16 years ago

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

in reply to:  5 comment:6 by hamish, 16 years ago

Replying to glynn:

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

comment:7 by hamish, 16 years ago

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

Hamish

comment:8 by pkelly, 16 years ago

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

in reply to:  8 comment:9 by hamish, 16 years ago

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

Note: See TracTickets for help on using tickets.