Apr 30, '07 07:30:00AM • Contributed by: wgscott
#!/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...]
