Run apps at different color depths simultaneously in X11

Apr 30, '07 07:30:00AM

Contributed by: wgscott

X11.app preferences allow you to set it to 256 colors for the occasional x-windows programs requiring this setting, but you may then find other x-windows applications don't function at all, or at least look terrible. There is a simple way to have it both ways, simultaneously. The trick is to create a wrapper shell script that looks something like this:

#!/bin/zsh -f
DISPLAY=:$$[3]$$[4]
Xquartz $DISPLAY  -depth 8    2>/dev/null  & 
quartz-wm &
/path/to/program/requiring/256/colors
This essentially forces a second X11 session to be started on a different (randomly determined) DISPLAY, so it can peacefully coexist with X11.app running in default mode (usually on DISPLAY :0.0, unless multiple users have X11 running with Fast User Switching). By randomly assigning the DISPLAY, multiple instances of the program invoked from the wrapper script can be run simultaneously. This works on Intel powered Macs now, too.

[robg adds: I haven't tested this one...]

Comments (4)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20070425175710285