#117 closed defect (fixed)
r.digit: make guarantee_xmon fail nicely on WinGrass
Reported by: | 4everskiff | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 6.4.0 |
Component: | Tcl/Tk | Version: | 6.3.0 |
Keywords: | Cc: | marco.pasetti@…, hamish_b@… | |
CPU: | Unspecified | Platform: | Unspecified |
Description
Tested on WinGRASS-6.3.0RC6
There's an error in the following menu command:
Raster -> Develop map -> Digitize raster
while r.digit works fine if launched from command line (both pure command line and Run GUI command option)
error log reported in attached file
Attachments (1)
Change History (15)
by , 17 years ago
Attachment: | r.digit.menu.error.log added |
---|
comment:1 by , 17 years ago
comment:3 by , 17 years ago
If you have no xterm, you might try putting something like this in ~/.grass.bashrc (if you have rxvt...)
export GRASS_XTERM=rxvt
Hamish
comment:4 by , 17 years ago
I changed grass-xterm-wrapper to automatically look for rxvt if xterm is not there (r30863)*, but I have zero idea at all how grass-xterm-wrapper should be handled for native MS Windows installs (but guarantee-xmon is useless there anyway, as there is no xmons, so don't bother?).
[*] add others as needed (eterm?). I added only rxvt because that's all I use; xterm is no longer installed by default on Debian.
note r.digit is just a simple front end to r.in.poly, which uses an ascii format very similar to v.in.ascii's format=standard. Thus creating a new wxPython raster digitizer to replace the old r.digit should not be /that/ much work. IMO using r.in.poly is a slightly better approach than v.digit+v.to.rast, although the latter happening for the backend wouldn't be so bad if it could be automated.
Hamish
follow-up: 6 comment:5 by , 17 years ago
Tested on WinGRASS-6.3.0RC6
...
while r.digit works fine if launched from command line (both pure command line and Run GUI command option)
r.digit works fine if launched from the WinGRASS command line?! This isn't Cygwin, right?
H
comment:6 by , 17 years ago
Replying to hamish:
r.digit works fine if launched from the WinGRASS command line?! This isn't Cygwin, right?
Yes, this is WinGRASS (Native Windows Binary) and r.digit works fine if started from command line (output window, both Run and RunGUI options). Current WinGRASS release contains rxvt as standard.
Marco Pasetti
follow-up: 8 comment:7 by , 17 years ago
Hamish:
r.digit works fine if launched from the WinGRASS command line?!
Marco:
Yes, this is WinGRASS (Native Windows Binary) and r.digit works fine if started from command line
You can really digitize then view a map created with it? As far as I knew r.digit needed an interactive xmon window, which is only available if using X11. It should fail with a "no monitor found" error *after* you give it a map name.
Perhaps something changed, but this surprises me.
I have backported grass-xterm-wrapper to the 6.3.0 branch, but I hope others can add more xterm compatible terms to the list as needed.
see also previous discussion:
http://thread.gmane.org/gmane.comp.gis.grass.devel/14702 http://thread.gmane.org/gmane.comp.gis.grass.devel/24109
re r20925, I assume that the various distro's x-terminal-emulator wrappers have gotten their act together re gnome-terminal since last time we tried. It works for me on debian (points to /usr/bin/gnome-terminal.wrapper which translates command line options); could Ubuntu users please re-test to see if r.digit now works from the gis.m menu? (that's where the earlier problems were reported)
I don't like changing this so late in the RC cycle, but hopefully it helps more than it harms.
Hamish
comment:8 by , 17 years ago
Replying to hamish:
You can really digitize then view a map created with it?
Hi Hamish. Sorry, you're right! I was going to open another ticket, while I realized that it was related to the same problem of that one. In fact, for both r.digit and v.digit, the command GUI opens, but the tool panel don't; that means that it's impossible to actually digitize both rasters and vectors.
What should we do? leave this ticket opened, or close it and add a new ticket reporting that r.digit and v.digit don't work?
Marco
comment:9 by , 17 years ago
Component: | default → Tcl |
---|
comment:10 by , 17 years ago
Priority: | major → minor |
---|---|
Summary: | r.digit fails if launched from menu → r.digit: make guarantee_xmon fail nicely on WinGrass |
AFAIK the Tcl version of v.digit works fine on native WinGrass, it's only menu items which call guarantee_xmon that won't work. Those are:
r.digit r.le.setup d.path.sh i.ortho.photo d.nviz
I have just modified guarantee_xmon in svn (r30966) to fail in a nicer way if there are no xmons*. It should really return with an error code, and menu items that call it should act like "guarantee_xmon && d.module" (I've no idea how to do that in tcl)
[*] the error message is perhaps misleading if the user has 8 xmons already running, so no free ones. Feel free to improve it.
nicer would be if those menu items were greyed out for WinGrass. again I've little clue how to do that in Tcl, but this is the shell code version that could be run at gui startup time before building the menus:
if [ `d.mon -L | grep -c '^x[0-9]'` -lt 1 ] ; then HAVE_XMON=0 else HAVE_XMON=1 fi
Hamish
comment:11 by , 17 years ago
Milestone: | 6.3.0 → 6.4.0 |
---|
follow-up: 13 comment:12 by , 17 years ago
Cc: | added |
---|---|
Resolution: | → fixed |
Status: | new → closed |
I just committed a fix to this, but can't test it on my Mac. At least it doesn't do any harm on a Mac.
Michael
follow-up: 14 comment:13 by , 17 years ago
Version: | 6.3.0 RCs → 6.3.0 |
---|
Replying to cmbarton:
I just committed a fix to this, but can't test it on my Mac. At least it doesn't do any harm on a Mac.
Michael
Hi Michael,
I'll test it as soon as possible. Is it on SVN GRASS trunk? BTW, the problem is that r.digit doesn't work on windows. Should we really leave the ticket closed? we probably should open a new ticket, such as:
WinGRASS: r.digit doesn't work
Marco
PS: I created a new OSGEOID, the previous 4everskiff was not actually appropriate :-) Starting from now I will always use the marcopx ID, as in IRC
comment:14 by , 17 years ago
Replying to marcopx:
I'll test it as soon as possible. Is it on SVN GRASS trunk?
it was committed to 'develbranch_6', see
'trunk' is dedicated for grass7 demolition, for main development (leading to 6.4.0) is used 'develbranch_6'
I cannot judge if this fix should be also committed to 'trunk'...
Martin
There are some small bugfixes pending in Michael's patch list. After commiting, they have to be backported to 6.3.0. Still with trunk there's an issue, that guarantee_xmon doesn't work anymore.