Click to See Complete Forum and Search --> : Switching X color depth on-the-fly


Captain Penguin
08-05-2001, 12:50 AM
Is it possible to change my color depth with a shortcut or easy console command that doesn't require editing XF86Config and restarting X?

I ask this becuase when I emulate Counterstrike in WINE it requires 16-bit desktop, but when I run UT I prefer it in 32-bit, since 16-bit looks like crap.

Help is thanked!

scott_R
08-05-2001, 12:55 AM
There's no way around it if you don't have your desired color depth specified in your xconfig, but if you do, a simple <ctrl><alt>+ or <ctrl><alt>- should work to adjust it to what you like. At least in theory. :)

lsibn
08-05-2001, 01:00 AM
None, except having 2 seperate XF86Config files. If you use Xdm, Kdm, or Gdm, it's pretty simple to run 2 different servers, running with 2 different configs. I don't know the specifics, except that for some servers:
startx -xf86config /etc/X11/XF86Config.16pp :1
would start X on display 1 with the file listed above as the config file.

bdl
08-05-2001, 01:12 AM
I had make a quick shortcut at one time, making a shell alias of the command for each color depth I wanted to run, e.g.

alias x16='startx -depth 16'

Obviously something like this must be run from the console, you can't change color depth from within X. It is a bit nicer then typing the entire command out though, and I've no doubt that you can assign the same command(s) to a keystroke if you wish.

Captain Penguin
08-05-2001, 11:07 AM
Originally posted by bdl:
<STRONG>I had make a quick shortcut at one time, making a shell alias of the command for each color depth I wanted to run, e.g.

alias x16='startx -depth 16'

Obviously something like this must be run from the console, you can't change color depth from within X. It is a bit nicer then typing the entire command out though, and I've no doubt that you can assign the same command(s) to a keystroke if you wish.</STRONG>


I like that idea, but -depth isn't a valid command.

How could I set it up to use 16bit or 32bit with a command-line argument, such as depth, but one that works?

Isibn, I think your idea would work, but I don't completely understand the .16pp :1 at the end there. Could you please explain that?

Thanks

Pras
08-05-2001, 01:25 PM
It should be 'startx -- -depth 16'. As far is Isibn's idea, the .16pp is actually part of the filename. The :1 specifies vc 1

bdl
08-05-2001, 02:06 PM
Originally posted by Pras:
<STRONG>It should be 'startx -- -depth 16'. As far is Isibn's idea, the .16pp is actually part of the filename. The :1 specifies vc 1</STRONG>

You're right, I completely overlooked that in the first post. DOH!

Also, I should mention for different versions of X, the argument is different:

X 4.x.x is startx -- -depth 16

while

X 3.3.x is startx -- -bpp 16

You can also, of course, set the default depth from within the XF86Config(-4) file, and only have to worry about maybe one or two other aliases to control the additional depths you wish to use.

Sorry for the confusion!

Captain Penguin
08-05-2001, 03:21 PM
Thanks guys It works fine now.