On Mon, Oct 23, 2000 at 01:21:51PM -0600, Blake Thornton wrote:
[...]
> First: Colormaps:
> Could someone give me a basic explanation of how the colormap works. When
> I am at home running linux I have not had to worry about this. But, up at
> school, we are running some version of unix and I have color problems in
> X. Expecially when I run netscape, but I can't even get emacs to
> recognize some colors (like orchid or palegoldenrod), I get the error:
>
> Warning: Cannot allocate colormap entry for "palegoldenrod"
>
> Also, this happened when I started running fvwm2 at school. I didn't have
> this problem when I was running twm.
[...]
Ok, I assume the machine you're using at school only has an 8bit
graphics adapter, which means 256 colours. Hence, when started, X will
reserve a "map" for 256 colours and each program that gets started will
try to allocate its own colours out of that map. Example: If one program
starts up and needs the colours red, green and blue, then they get
allocated and three spaces in the map are gone. When another program
comes along and needs red, green, blue, yellow and orange, then the
first three are already there (allocated by the first program), but the
next two colours are not there yet, so another two "cells" will be
allocated. That's five gone, 251 to go.
The whole story continues as each program allocates cells for its
colours (if they're not already there) until the map is full. Which is
exactly what happened in case of your emacs above - emacs wasn't able to
get those two colours, as all 256 cells were already gone. Most programs
will then try to replace the missing colours with some that are already
in the map.
You can probably imagine at this point that this problem occurs the
sooner the more colours are used by your programs. Netscape (due to the
nature of the web) is especially bad in colour hogging. Add a nice
background picture to the desktop and ZOOM - all colours gone.
In case of fvwm2 vs. twm, my guess would be that the fvwm2 setup you're
using simply needs quite a few more colours than the simple twm, hence
the problem you've encountered.
Is there a way around that? Yes. On machines with low colour resolution
(i.e. 8bit or worse), you could try the following two things:
- some programs offer the choice to use their own colourmap. Netscape
will do so when invoked with the "-install" command line switch. It
will then happily install its own map, leaving the main one alone.
Downside: Whenever you enter the Netscape window, the maps will need
to be switched, leading to colour flashing. Also, either Netscape or
the rest of the screen (depending on whether the Netscape window is
focussed) will look discoloured.
Some programs also install their own colourmap automatically when
they detect there aren't enough for them. xfig is an example for that.
- Use window manager themes with only a few colours.
The less colours your window manager uses, the more are left for all
the other programs. This also goes for any backdrops or icons you're
using.
OR
Use a window manager capable of dithering. Window Maker is an example
for this - it can be told not to use more than e.g. 64 colours and
will dither all images it uses for backdrops, icons, titles, etc. to
that amount of colours. Looks a bit grainy, but still a reasonalble
compromise, as other programs can still run properly.
I hope that this makes it a bit clearer.
Regards,
Thomas
--
"Look, Ma, no obsolete quotes and plain text only!"
Thomas Ribbrock | http://www.bigfoot.com/~kaytan | ICQ#: 15839919
"You have to live on the edge of reality - to make your dreams come true!"
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list