[GRASS-dev] Re: gis.m,
thematic layer: You must open a display monitor
Michael Barton
michael.barton at asu.edu
Tue Feb 13 10:06:44 EST 2007
There should be a flag to send output to the gis manager. This flag should
cause this conditional to be skipped.
Michael
On 2/13/07 7:58 AM, "Moritz Lennert" <mlennert at club.worldonline.be> wrote:
> On 13/02/07 15:29, Michael Barton wrote:
>> I have no idea. Perhaps I'm imagining things, but I swear that I'm seeing a
>> LOT more of these messages recently--with their deleterious effects on
>> scripting. Hamish says they've been there all along. I'm suspecting that the
>> code for the message has existed, but they did not get parsed for some
>> reason. But that is just speculation.
>
> Well in this case, there is a change by Daniel dated Jan. 28 which might
> be linked:
>
> - Added quotes in occurences of 'if [ -z "$var" ]'
>
> But reverting back to no quotes gives the same error message.
>
> Looking at the logic, I don't actually understand how this worked
> before. As I said, IIUC the x-mon test seems to be done whether you are
> using GIS Manager or not. But under GIS Manager there should be no x-mon...
>
> Conditonalising the check as follows:
>
> if [ "$GIS_FLAG_S" -eq 0 ] ; then
> if [ -z "$currmon" ] ; then
> echo ""
> echo "*** You must open a display monitor ***"
> echo ""
> cleanup
> exit 2
> fi
> fi
>
> makes the error message go away, but I get a new one:
>
> Usage: /usr/lib/grass/etc/mon.select monitor_name
>
> This time, however, the map and legend are displayed correctly (without
> the "fix" only the legend is displayed). I can get this second error
> message to go away by commenting line 862:
>
> # d.mon select=$currmon
>
> This comes from the fact that $currmon is empty in GIS Manager. Again, I
> don't understand why we have to deal with d.mon here if we are in the
> GIS Manager...and why this did not cause any problems before.
>
> Moritz
>
>
>>
>> Michael
>>
>>
>> On 2/13/07 6:19 AM, "Moritz Lennert" <mlennert at club.worldonline.be> wrote:
>>
>>> Michael,
>>>
>>> I am seeing a new error for d.vect.thematic. Trying to display a
>>> thematic layer fails with the message: *** You must open a display
>>> monitor ***
>>>
>>> I can reproduce this with any spearfish vector layer.
>>>
>>> The problem seems to be in lines 336-345 where it checks for the
>>> existance of an x-monitor. It seems to do this unconditionally, so even
>>> if you run it from the GIS Manager it still checks and fails if there is
>>> not monitor.
>>>
>>> I can't find anything recent in the commit logs that would explain this,
>>> so before trying to go deeper into it, I wanted to know if you had an
>>> idea why this is suddenly happening.
>>>
>>> Moritz
>>
>> __________________________________________
>> Michael Barton, Professor of Anthropology
>> School of Human Evolution & Social Change
>> Center for Social Dynamics & Complexity
>> Arizona State University
>>
>> phone: 480-965-6213
>> fax: 480-965-7671
>> www: http://www.public.asu.edu/~cmbarton
>>
>>
>
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton
More information about the grass-dev
mailing list