Mainpage
Searchform
History
Versions
Categories
Contents
Deutsch
SuSE Linux: Versions since 4.2
The color depth
specifies, how many bits are used to store a pixels
color value. Also the number of the colors available at the same time is
limited by this.
The number of usable colors (at the same time) has nothing to do with a graphic cards ability to display colors. A selection of n colors (e.g. 256 with 8 bit color depth) from all the colors that the graphic card can produce is used.
On most of the X servers the following (or some of the following) color depths are available:
xdpyinfo | moree.g. in an xterm.
It produces a lot of output. The following is an excerpt of such an output :
name of display: Heron.suse.de:0.0 version number: 11.0 vendor string: The XFree86 Project, Inc vendor release number: 3200 maximum request size: 4194300 bytes motion buffer size: 256 bitmap unit, bit order, padding: 32, LSBFirst, 32 image byte order: LSBFirst [...] default screen number: 0 number of screens: 1 screen #0: dimensions: 1280x1024 pixels (433x347 millimeters) resolution: 75x75 dots per inch depths (2): 1, 8 root window id: 0x2a depth of root window: 8 planes number of colormaps: minimum 1, maximum 1 default colormap: 0x26 default number of colormap cells: 256 preallocated pixels: black 0, white 1 [...]The section "screen #0" is interesting for the determination of the color depth.
There the current resolution (dimensions: 1280x1024 pixels (433x347 millimeters)), the color depth (depth of root window: 8 planes; here 8 bits) and the number of the possible colors (default number of colormap cells: 256; here 256 colors) is shown.
Therefore, one must always exit the X server and then restart it with
startx
or via xdm.
There are several ways to configure the color depth.
startx
:
Please use the following command :
startx -- -bpp 16The 16 represents the color depth. Please set the corresponding value here.
Please notice the double hyphen BEFORE the command line parameter.
startx
:Please edit the file
~/.xserverrcIf this file doesn't exist in your HOME directory, please copy the file
/etc/skel/.xserverrc.secure
into your HOME directory and
rename it :
cp /etc/skel/.xserverrc.secure ~/.xserverrcAt the end of the file you will find the lines:
exec X :0 -auth .Xauthority $* else exec X :0 $* fiPlease enter the parameter for the color depth behind the exec call, e.g.:
exec X :0 -auth .Xauthority -bpp 16 $* else exec X :0 -bpp 16 $* fiAs a result of this startx will start your X server with 16 bit color depth.
xdm
to start the X window system:
Edit the file
/usr/X11R6/lib/X11/xdm/Xserversand change the appropriate line according to the following example
:0 local /usr/X11R6/bin/X vt07 -quiet -bpp 16
Starting with XFree86-3.1.2F of the S.u.S.E. specific
version it is also possible to enter the default color depth into the file
/etc/XF86Config
. E.g. enter the following line in the
Section "Screen"
:
DefaultColorDepth 16
Example:
Section "Screen"
Driver "Accel"
Device "Primary Card"
Monitor "Primary Monitor"
DefaultColorDepth 16
...
This setting can of course be overridden with the above mentioned
command line option -bpp
.
See also:
Keywords: XDM, STARTX, X-SERVER, COLORS, COLOURS, COLORMAP, COLOR DEPTH, BPP, BITPLANE, DEPTH
Categories:
X Server
, X Window System
Mainpage
Searchform
History
Versions
Categories
Contents
Deutsch