Andrea Bistacchi wrote:
Dear all,
I just finished installing Grass5beta6 (intel PC with linux redhat 6.1),
but when I try opening a window I get the following error:
...
can not allocate any read/write color cells
Problem selecting x6. Will try once more
run xdpyinfo (/usr/X11R6/bin/xdpyinfo)
scroll through the output looking for
depths (2): 1,8
this means you are running a 8 bit display
If this is not true ignore all of the rest of this message.
GRASS 24 bit XDRIVER has problems if:
there is more than one visual
the default colormap is not writeable
I hacked this patch to run GRASS on some SUNS with 8 bit displays, and I
tested it on a RH6.1 Linux using startx -- -bpp 8.
(I get the same results as you did when in 8 bit mode on XFree86)
inside your grass source
cd to
src/display/devices/XDRIVER/XDRIVER24
and apply the attached patch
patch -p1 < XD2.diff
then /usr/local/bin/gmake5 while in that directory
If all goes well, you should immediately be able to
d.mon start=x0 to you hearts delight.
As a bonus if you want to force TrueColor for your 8 bit
Display (you are running XF86 3.3.5 and it supports multiple visuals)
set nlev to be -1
d.mon start=x0 nlev=-1
on your 8 bit display you will not be able to see any difference
excepting that the color palette for the screen will be animated
as you enter the screen.
to compare
d.mon start=x0
and
d.mon start=x0 nlev=-1
at the same time.
SUNs have overlays that allow multiple bit depths at the same time. ie
the
default visual is 8bit PsuedoColor but has 24bit TrueColor available.
DISCLAIMER:
This patch works for me but your results may vary.
I don't pretend that the code is pretty only functional (for me)
save the files
Graph_Set.c
SWITCHER.c
local_proto.h
Clr_table.c
if you want to revert the changes
or you can
patch -p1 -R < XD2.diff
Please email the results should you try the patch.
ATTENTION:
Markus Neteler, this is not the patch I sent you over the weekend.
This
version searches for a TrueColor visual a bit harder before
dropping to the default Visual.
--
----------------------------------
E-Mail: candrsn@mindspring.com
Date: Wed, 03/27/2000 12:00:00 +0000 (GMT)
Flying Monkeys Usually Mean Trouble.
----------------------------------
(attachments)
XD2.diff (7.52 KB)