"The Linux Gazette...making Linux just a little more fun!"


(?) The Answer Guy (!)


By James T. Dennis, tag@lists.linuxgazette.net
Starshine Technical Services, http://www.starshine.org/


(?) Changing the X Server's Default Color Depth

From Peter Waltman on Wed, 02 Dec 1998

(?) I'm using redhat v.5.1 and have just installed it, so I have not made too many modifications yet. The default window manager rh 5.1 uses is fvwm2. I have been trying to figure out how to configure these window managers (fvwm and fvwm2) for some time now, when I realized I guess that rh 5.1 is using FvwmM4 to parse the rc files. I've looked through those, as well as the FvwmM4 man page to figure out how to change the color depth. I think it has to do with the Color PANEL setting or the RGB_PIXELS setting, but I'm not sure where or how to set it. In the XF86Config file? One of the of the fvwm2rc.* files provided by rh?. The FvwmM4 man page says that you can define these settings, but have I tried to do this without much success. Any help or links to info on how to modify rh window manager would be GREATLY appreciated.

(!) Window Managers have nothing to do with setting your X server's color depth. A window manager is an X client --- it talks to the server. By the time any clients are being loaded and issuing X protocol requests of the server (to draw windows on your display, or recieve mouse and keyboard events, for example) it is too late to change the color depth.
You are correct regarding M4. Some window managers use 'cpp' or 'm4' (macro preprocessor utilitiies) to expand your configuration files into their internal configuration language.
I pointed out in my other response that you can change this setting in your XF86Config file. In my discussion of modifying the xdm Xservers file I forgot to mention that any error can cause your system to appear hung. (You might have to log in via telnet or a serial terminal to kill the X server if you make a syntactical mistake in that file).
As for broader advice on X Windows configuration, read the XFree86 FAQ (as I listed in my other response) and browse through some resources that are devoted to X. Some very extensive link lists are at:
Kenton Lee's:
Technical X Window System and Motif WWW Sites
http://www.rahul.net/kenton/xsites.html
... and one of my favorites listed there is:
Brandon Harris':
X: End of Story
http://www.gaijin.com/X

(?) Changing color depth for xdm?

From Peter Waltman on Wed, 02 Dec 1998

(?) I just checked out the 2 cent tips, which have a page describing how to change and set up multiple x servers for differing color depths. the only thing is that this describes how to change the startx script, whereas I am using xdm when I boot up. I don't think modifying the strartx script would have any effect for xdm. Am I wrong in this? If not, how/what would I modify to change the color depth for xdm?

(!) Add the following entry to the active "Screen" section of your XF86Config file:
DefaultColorDepth XX
... where XX is the desired depth (8, 16, 24, or 32).
Another way to do this is to edit the '/usr/X11R6/lib/X11/xdm/Xservers' file and add the -bpp parameter to the :0 (and possibly any :1 and other similar lines) therein.
xdm reads the 'Xservers' file to find the command line with which it can invoke an X server. There should a a line something like:
		:0 local /usr/X11R6/bin/X :0 vt07 -quiet
... in there. You can change that to something like:
		:0 local /usr/X11R6/bin/X :0 vt07 -quiet -bpp 16

(?) again, thank you very much
Peter Waltman

(!) That should do the trick. Oddly enough this is not in the FAQ at http://www.XFree86.org, though I've copied the maintainer of that document since I've seen the question several times.
Hopefully he'll add it. Meanwhile, remember to check in the XFree86 FAQ for questions about that package.


Copyright © 1999, James T. Dennis
Published in The Linux Gazette Issue 36 January 1999


[ Answer Guy Index ] a b c 1 2 3 4 5 6 7 9 10 11 12
15 16 18 19 20 21 22 23 24 25 26 27 28
29 31 32 33 34 35 36 37 38 39 40 41 42 44
45 46 47 48 49 50 51 52 53 54 55 56 57 60 61 62 63 64 65 66
67 69 72 76 77 78 79 80 81 82 84 85 86 87 91 94 95 96 97 98


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]