[GRASSLIST:4461] Re: d.mon -> X Error ->monitor fails to open

Glynn Clements glynn.clements at virgin.net
Wed Sep 11 14:36:27 EDT 2002


John Gillette wrote:

> Grass5.0.0 on "dist.sparc-sun-solaris2.7" just compiled.
> 
> Starting grass from same place as pre3 version (i.e. 
> same .grassrc5 files, data base etc.).
> 
> TCLTKGRASS 3.2(2001) pops right up.
> 
> Go to start monitor and I get the following:
> 
>  found 5 visuals of type TrueColor
>  searching for highest bit depth
>  selected 24 bit depth
>  X Error of failed request:  BadMatch (invalid parameter attributes)
>    Major opcode of failed request:  1 (X_CreateWindow)
>    Serial number of failed request:  8
>    Current serial number in output stream:  20
>  No socket to connect to for monitor <x0>.
>  Problem selecting x0. Will try once more
>  No socket to connect to for monitor <x0>.

This is odd; in the call to XCreateWindow(), the visual and depth
values both come from the same XVisualInfo structure. If they don't
match, that suggests that XGetVisualInfo() is returning bogus
information.

Try modifying find_truecolor_visual() (in
src/display/devices/XDRIVER/XDRIVER24/Graph_Set.c) to print out more
information regarding the XVisualInfo structure and it's associated
Visual structure.

> This is a change from pre3 which never had a problem
> opening a monitor.  I did have problems with the colors 
> (or lack there of) but not the monitor.   

There are two distinct mechanisms for choosing a visual. If the
environment variable GRASS_TRUECOLOR is set to "TRUE" (which is the
case for you), the deepest TrueColor visual is chosen. Otherwise, the
default visual is used (which would provide at most 256 colours on
your system).

If you had problems with too few colours in previous versions, this
suggests that the default visual was being used then, whereas now you
are selecting a TrueColor visual. IIRC, the use of GRASS_TRUECOLOR was
introduced after pre3; pre3 used the option "nlev" argument to "d.mon"
to select a TrueColor visual.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-user mailing list