Index of /sereno/mapper

 NameLast modifiedSizeDescription

 Parent Directory  -  
 old/2022-05-31 13:51 -  
 mapper-mac-220331.tgz2022-05-31 13:43 12M 
 mapper-linux64-220531.tgz2022-05-31 13:43 13M 
 UPDATES.txt2022-05-31 13:42 75K 
 SelfUnpackMappingMac.zip2022-05-31 13:44 2.2M 
 SelfUnpackMappingLinux64.zip2022-05-31 13:44 2.9M 

#######################################################################
mapper -- X11/OpenGL stimulus program for Mac OS X and Linux
#######################################################################

Mapper (X11/OpenGL application) -- Summer 2022

==========================================================
Linux black screen FIXED on CentOS7/Ubuntu18.04 (sorry!)
==========================================================

Written by Martin Sereno (msereno@sdsu.edu or msereno@ucsd.edu),
2001-present, at UCSD, UCL/Birkbeck, and SDSU.  Original C/IrixGL
code for polar/eccen checkerboard, low-contrast moving vs. stationary
rings, and coherent vs. incoherent flow fields by Anders Dale (1996).
Coherent polar dot wedge on dot background by Don Hagler.

This program generates a large number of different phase-encoded
and block design stimuli for fMRI mapping, including visual, auditory,
somatomotor, and linguistic stimuli.  It records time-stamped
keyboard responses (keys 0-9).  On Mac, it reads and produces TTL
pulses (1-32 bits, via USB-DIO-32 ACCES TTL<->USB box attached to
a USB port using includes loader/driver (libusb port in progress).
Finally, it can read ASCII scenario files for completely arbitrary
experimental designs (see below).  Most text-displaying options
can read/display UTF-8 (multi-byte) characters (e.g., Chinese).

The main program (a standalone binary, 'mapper') requires at minimum,
a single initial numerical argument indicating the stimulus type:

  use: mapper -stimtype <num> [opts...]

N.B.: On Mac, this is designed to work from an xterm in XQuartz.app
"Full-screen mode" (esc kills stim).  To kill mapper accidentally started
from Terminal in rootless mode unkillable by esc, click around to make
the mouse re-appear, open an xterm or a Terminal, and then do 'killall
mapper'.  Several Mac programs (e.g., Safari) can cause XQuartz to flip
back to the Mac screen from fullscreen X11 to 'helpfully' interrupt
you with some important news.  Simply close down other running programs
before starting mapper.

Tested on:
  MacOS 10.6 - 10.15
  CentOS 5.9 - 7.6
  Ubuntu 12.04 - 20.04

Recent fixes (Mar-May 2022):
  Mac: added fxload (USB) in case AccesLoader fails
  Ubuntu: no longer need to install jpeg lib
  CentOS 7: fixed black screen no stim display
  Ubuntu 18.04/20.04: fixed mmap doesn't start
  Ubuntu/CentOS: if motion jerky, first do: export __GL_SYNC_TO_VBLANK=0 

==================================================================
Basic self-unpacking distribution, mmap
==================================================================

A basic set of stimuli can be run using the all-in-one self-unpacking
binary, mmap, which is included in:

  SelfUnpackMappingLinux64.zip
  SelfUnpackMappingMac.zip

After unzipping the Linux or Mac version, here is a quick example
summary of how to use it to run the V6 localizer stimulus:

  cd <directory-where-you-put-mmap>
  ./mmap rotdil32
  F1    # start
  F2    # reset to wait
  Esc   # kill

The stimuli all run forever until you hit Esc.  See the included
README.txt file for more details on how to change parameters.

On Ubuntu/CentOS, if the motion stimuli don't seem to move smoothly,
try the following (bash) shell command before running mmap:

  export __GL_SYNC_TO_VBLANK=0 

==================================================================
Install full binary distribution
==================================================================

The binary package can be installed anywhere.  Compiled and tested
on Mac OS X (10.6 to 10.15 -- ppc, i386, x86_64, and arm64 w/Rosetta2),
and Linux (RedHat 9 to Fedora 30, CentOS 4 to 7, Ubuntu 12 to 18
-- i386 and x86_64).  The mapper program uses external *.ttf or
*.ttc font files (several are included if system ttf's are not in
their usual locations).  It requires that the standard X utility,
xdpyinfo, be on the users's path (for determining screen dimensions).

### install, run mapper in user's home directory (tarfiles in /tmp)
[download mapper-YYMMDD.tgz to ~/Downloads]
cd ~
tar xvfz ~/Downloads/mapper-YYMMDD.tgz
cd mapper
source MapperEnv.sh (or source MapperEnv.csh)
allscripts (or mapper w/args, or included script, e.g., pol1)

### install additional 0.5G lib images, sounds (into installation above)
cd ~/mapper/lib
tar xvfz /tmp/libsndimg.tgz 

### Mac: you must un-quarantine the new mapper directory!
sudo xattr -r -d com.apple.quarantine ~/mapper

==================================================================
Path/environment setup script
==================================================================

The mapper program (./bin/<architecture>/mapper) can be run directly
from the command line without any changes to path or environment.

To run the mapper script tk interface, allscripts, first set up the
environment by source'ing the environment setup script, MapperEnv.csh
or MapperEnv.sh (see examples below).  This puts proper architecture
mapper binary and $MAPPER_DIR/lib/scripts on your path, and sets
up environment to run included X11 tcl/tk -- useful esp.  on Mac
because native Mac OS X tk: (1) is not X11, (2) so won't work in
X11 fullscreen, (3) so can't get rid of menubar.

To run MapperEnv.sh (or MapperEnv.csh), cd to directory it is in,
and type "source MapperEnv.sh" (or "source MapperEnv.csh").  OK to
anywhere afterward.  Here is how to make alias to do this:

In sh/bash:

  alias ma='pushd <your_install_dir>; source MapperEnv.sh; popd'

or in csh/tcsh:

  alias ma "pushd <your_install_dir>; source MapperEnv.csh; popd"

The alias method is non-invasive since it only affects the current
shell (as opposed to sourcing the MapperEnv script in .bashrc or
.cshrc, which would affect every new shell).

If mapper cannot find one of the shared libraries it requires, you
will get a message like this:

Darwin
  dyld: Library not loaded: ... <somelib>.<num>.dylib
  Referenced from: /Users/<you>/mapper/bin/Darwin-ppc/./mapper
  Reason: image not found
  Trace/BPT trap

Linux
  mapper: error while loading shared libraries: lib<somelib>.so.<num>: cannot
  open shared object file: No such file or directory

To avoid this, several key libraries are statically compiled.

On Mac OS X 10.8+, after setting up paths, since DYLD_LIBRARY_PATH
has been set (for X11 tcl/tk), you may get a harmless error that
DYLD_LIBRARY_PATH will be ignored for a setuid program.  Note that
mapper is *not* a setuid program.

MapperEnv.sh (or MapperEnv.csh) and allscripts work in sh/bash (or
csh/tcsh).  If the environment setup scripts somehow fail or you
don't want to use them, simply put the appropriate architecture
mapper binary and the scripts dir on your $path (or $PATH).

==================================================================
Documentation and right-click pop-up help
==================================================================

The most compact documentation is the (overly) long usage message
from:

  mapper

There are over 300 command line options.  To get a minimal helpfile:

  mapper > help.txt

To search for a particular option:

  mapper | grep <keyword>

All stimtypes (over 100, listed at top of usage message) should
work without any additional options.  For example:

  mapper -stimtype 10

To print out the default values for every option for a given stimtype:

  mapper -stimtype <num> -printdefs

To search for the default value of a particular option, type:

  mapper -stimtype <num> -printdefs | grep <keyword>

To get a help pop-up window for a particular stimulus num, use:

  helpstim <num>

Starting allscripts from the command line puts up a mapper runner
window with about 300 buttons, each of which runs one of the scripts
in $MAPPER_DIR/lib/scripts (see below for how to configure which
allscripts buttons appear).  You get the same help pop-up's just
mentioned above upon right-clicking a script button in allscripts
(see below).

There are about 500 mapper scripts in $MAPPER_DIR/lib/scripts that
illustrate the relevant options for each stimtype.  There is also
a NOTES.txt file in lib/scripts and code update details in UPDATES.txt
in $MAPPER_DIR.

To interactively fiddle with mapper options, open allscripts, then
middle-click a button to get a panel of editable parameters (with
a "testrun mapper" button at the top).  A text editor is also started
so that the same script can be edited to save modified parameters.

For clarity, all scripts have one option per back-slashed line.  Be
sure to avoid inserting any extra invisible spaces after a backslash
when editing, which will disable the line-continuation effect of
the backslash!

Some printed default values for a stimtype may not be relevant
(change -> no effect).

If -logfile is specified (auto-turned on for many scripts), a logfile
with a date-and-time filename is written into the directory, ./logs,
containing the complete command line used to start mapper, and then
time-stamped stimulus events and key responses (0-9 keys).

==================================================================
Using arbitrary scenario files
==================================================================

For arbitrary block design experiments, use stimtype 60, which reads
an extended version of Hillyard/Kutas VVSP format text scenario
files (see mapper usage for syntax) to position, scale, and display
text (including character strings in UTF8 fonts accessed via decimal
or hex codepoints), tiffs and colored rectangles, play sounds, emit
TTL byte codes or single TTL bits (via ACCES USB<->TTL box on Mac),
and to log stimulus and keypress events, and TTL responses (on Mac).

Images are preloaded into memory (repeated images with same filename
use no additional memory) for exact timing (within one video frame
for reasonable numbers of simultaneous images and text strings per
individual video frame).  8G of RAM can hold over 25,000 unique
320x240 color images.  See below for more details.

==================================================================
File name conventions
==================================================================

User-created experiment-specific image, sound, and word files can
be accessed from anywhere, but most conveniently from user-created
subdirectories of:

  $MAPPER_DIR/lib/imagefiles
  $MAPPER_DIR/lib/soundfiles
  $MAPPER_DIR/lib/wordfiles

For example, a user could create a new directory:

  $MAPPER_DIR/lib/imagefiles/expt3

and place a set of tiff images inside of it.  To make mapper use
these images, then simply use the option:

  -tiffdir expt3

To use tiffs from a directory in a different/arbitrary location,
specify an explicit full path (starting with a '/') or an explicit
relative path (starting with a '.'), for example:

  -tiffdir /Users/marty/expt3   # full (absolute) path
  -tiffdir ./expt3              # or: curr directory (where mapper runs)

Many stimtypes load and use all tiffs found in the specified -tiffdir.
However, sometimes it is necessary to refer to an individual image
file (e.g., in an rgb=<image> line in stimtype 60).  In this case,
a bare filename (e.g., image1.tiff) will refer to a file in the
current -tiffdir.  But a full path (starting with a '/') or an
explicit relative path (starting with a '.') can also be used, which
will override -tiffdir (or make it unncessary).

The same filename rules apply to -sndfiledir and soundfiles, and
-worddir and wordfiles.

==================================================================
Modifying which buttons/scripts "allscripts" shows
==================================================================

By default, allscripts shows a large number of script buttons (over
300).  To change which script buttons appear (e.g., to omit buttons,
or to add new ones), pass allscripts an ASCII file (e.g., mybuttons.txt)
containing rows of buttons to show:

  allscripts mybuttons.txt

The first line must start with "# allscripts button config".  The
following lines should contain space- or tab-separated script names
for each row of buttons in the interface.  For example, to show
three rows of buttons, two per row, use a file like this:

  # allscripts button config
  ecc1 ecc2
  pol1 pol2
  rotdil32 rotdil32b

To add bold titles for each row, end the first entry in a row with
a colon:

  # allscripts button config
  eccen: ecc1 ecc2
  polar: pol1 pol2
  flow: rotdil32 rotdil32b

or use an initial "" to get an indented, title-less row:

  # allscripts button config
  map: ecc1 ecc2
  ""   pol1 pol2
  flow: rotdil32 rotdil32b

To make this the default, edit the (long) $scriptsets variable in
allscripts, which specifies each line of widgets.  The giant
default config is saved in allscripts.defconfig

==================================================================
Mac OS X specifics
==================================================================

This program requires X11.  Since X11.app no longer ships with Mac
OS X starting from version 10.7, download XQuartz.app and do a
default install (tested on XQuartz.app 2.7.3 to 2.7.8 on Mac OS X
10.4 to 10.12).  Makefile now looks in /opt/X11 for include, lib.

For final stimulus presentation, run the mapper program from an
xterm window in full screen mode (X11->preferences->Output, click
fullscreen).  This removes the menu bar, and running from xterm
makes it easier to kill than when running from Terminal.

The command for toggling between fullscreen X11 and the Mac desktop
(cmd-option-A) is worth writing down.  Fullscreen fails in 10.5.1
to 10.5.6 (menu bar won't go away; see instructions below for how
to install OS X 10.4 X11.app to fix this).  The precompiled Mac
mapper x86_64 binaries work from 10.6 up.

Soundfiles are played using afplay.  On 10.4, this needs to be
compiled with XCode and put into $MAPPER_DIR/bin/Darwin-i386.  In
10.5 and up, it will be present as /usr/bin/afplay.

To make quick-and-dirty soundfiles on the Mac, select text in
TextEdit, do shift-cmd-R (equals: TextEdit->Services->Add to iTunes
as Spoken), and then drag-drop m4a's out of iTunes into
lib/soundfiles/<exptdir>.

Mac mapper has compiled-in support for TTL I/O through USB via a
USB-DIO-32 ACCES TTL<->USB box (see ./AccesUSB dir):

  http://www.accesio.com/go.cgi?p=../usb/usb-dio-32.html

This requires using the -loadaccesdev option or running AccesLoader
once (pre-compiled binaries and source are included) before using
the USB-DIO-32 box.  Included scripts ('run' or 'loadUSB', automatically
called when using the script runner, 'allscripts') test if the Acces
loader needs to be run and run it only if needed.  ACCES provides
some Linux support, but that is not yet included here.  In the
future, unified Darwin/Linux ACCES support should be provided via
libusb (TODO).

An alternate USB method of starting a stim is option -fivekeytrigger
This will cause a USB keyboard '5' keypress to start the stimulus.
After the stimulus has started, any additional '5' keypress will
be logged as a response (N.B.: subject must not press '5' before
start :-} ).

Starting with Mac OS X 10.11, the environment variable DYLD_LIBRARY_PATH
is no longer passed to subshells.  To get allscripts to use X11 tk
(instead of native Mac tk), allscripts is started with:

#! /bin/sh
# next line not seen by tcl upon reentry by exec \
DYLD_LIBRARY_PATH=$MAPPER_LIBRARY_PATH exec wish8.5 $0 -- ${1+"$@"}

This requires that MAPPER_LIBRARY_PATH is defined -- usu. done by
MapperEnv.{c}sh.

==================================================================
Linux specifics
==================================================================

Linux OpenGL performance will likely be inadequate in a virtual
machine or with the xorg nv driver (use nvidia driver from nvidia.com).
Also, many stims need working wait-for-top-of-frame function, which
must be enabled in Linux Nvidia and ATi drivers as follows:

 Nvidia glx:  setenv __GL_SYNC_TO_VBLANK 1       # 0 better on CentOS7!
 ATi fglrx:   xorg.conf: Option "Capabilities" "0x00000000" # user must do

Soundfiles are played with "play" (sox).  To use a different program,
use -sndprog <prog>.  It will be called as: <sndprog> <sndfile> &

To use Mac-created *.m4a soundfiles on Linux, first convert to aiff
(or wav) in iTunes:

 1) iTunes -> Preferences -> ImportSettings -> AIFF Encoder
 2) ctrl-click m4a in iTunes -> Create AIFF version
 3) [put back your original encoder!]
 4) drag-drop *.aif's it out of iTunes
 
==================================================================
Compile source distribution
==================================================================

If you want to re-compile (e.g., to modify) mapper, the local
external libraries (libtiff, freetype, ftgl, all statically linked)
and X11 tcl/tk/tix 8.5 (used by the script runner, allscripts) also
need to be recompiled once.  The source for everything is included
in mappersrc-YYMMDD.tgz.  Use the sh (or csh) script, mk0 (or
mk0.csh) as follows.

### compile all required libraries, then mapper
tar xvfz /tmp/mappersrc-YYMMDD.tgz
cd mappersrc
./mk0 onearch

### edit mapper, recompile/re-link just mapper
vi mapper.c
[see instructions for add stimtype at top of mapper.c]
./mk0 mapper

### run recompiled mapper from the source distribution:
source MapperEnv.csh (or source MapperEnv.sh)
allscripts (or "mapper -s <num> [opts ...]", or <script>)

==================================================================
Increasing priority of mapper process (1): mapper installed as root
==================================================================

If the priority of mapper is raised above other processes, it will
be less likely to be interrupted and drop frames.  Normally, only
root can increase priority above default, so a regular user has to
use sudo.  If mapper has been installed by root in /usr/local/mapper,
then simply add a line to /etc/sudoers that looks like this:

  <user> <machine>=NOPASSWD: /usr/local/mapper/lib/scripts/renicemapper

replacing <user> and <machine> with your user and machine name.

Now (as root!) copy the renicemapperON version of the script to
just "renicemapper":

  cd /usr/local/mapper/lib/scripts
  cp renicemapperON renicemapper

Finally, after mapper has been started by a regular user, run:

  sudo renicemapper

In X11.app fullscreen mode, this can be done by one of the following:

 (1) running mapper from script: mapper ... &; sudo renicemapper &
 (2) temporarily exit X11.app to a Terminal w/opt-cmd-A, sudo renicemapper &
 (3) run sudo renicemapper & from a remote login

All the supplied scripts already do (1), attempting to run 'sudo
renicemapper' (using whatever renicemapper is on user's $path)
automatically if user is allowed to in /etc/sudoers, as determined
by sudo -l &.

==================================================================
Increasing priority of mapper process (2): mapper installed as user
==================================================================

If mapper has been installed in a user directory (for example, the
user's home directory instead of root-owned /usr/local/mapper),
copy the renicemapper script to a secure place only writable by
root (e.g., /usr/local/bin), add that secure path to /etc/sudoers,
and make sure that the copied renicemapper is on the user's $path.
For example:

 (1) as root, cp renicemapperON to /usr/local/bin/renicemapper (root-owned dir)
 (2) as root, add /etc/sudoers line above, but with /usr/local/bin/renicemapper
 (3) make sure /usr/local/bin is on user's $path (try "which renicemapper")

 N.B.: don't put path to *user-owned* renicemapper in sudoers!  By adding
       a *user-editable* script to /etc/sudoers, you allow commands
       to be run as root (by a user editing that script); by contrast,
       a non-user-editable/writable renicemapper is *not* a security
       hole.

It is worth doing this for best performance.

==================================================================
Increasing priority of mapper (3): mapper installed as admin user Mac
==================================================================

Since an admin user on Mac will by default will be able to execute
ALL, renicemapper will be installed into $MAPPER_DIR/lib/scripts,
and can be used to run, for example the 'pol1' script, as follows:

  sudo echo; pol1

The first command echoes nothing, but will allow the pol1 script
to run 'sudo renicemapper' (successful sudo caches priviledge for
5 min by default).

==================================================================
Using stimtype 60: extended Hillyard/Kutas scenario file
==================================================================

If stimtype 60 is used, the mapper program will read an extended
Hillyard/Kutas ASCII scenario file, that can be prepared with any
text editor:

  mapper -stimtype 60 -exptfile expt.scn [other opts...]

The scenario file, expt.scn, contains 'events', each of which have
a specified duration and SOA to the next event.  Each event begins
with a particular stimulus type, which is either ASCII text (text=),
UTF8 text (utf8d=,utf8h=), a tiff image (rgb=), a file specifying
colored rectangle(s) (pgi=), a TTL pulse (ttl=), or a sound (snd=).

Each event can have zero or more continuation lines in order to
optionally add additional stimuli to the timed event (can be of any
type above).

Each event (non-continuation) line must have 3 args: SOA, duration
(both in milliseconds), and stimtype (stimtype=value).  To add
another simultaneous stimulus to an event, end a line (either an
event or continuation line) with a "+".  An event or continuation
line *without* a "+" ends the event.  Continuation lines omit
SOA/duration (they are inherited from the current event).

Events and continuation lines can contain additional options
(xoff=,yoff=,color=,size=,lblo=,font=).

When positioning tiffs, the xoff,yoff specification by default
'grabs' them by their center, with 0,0 meaning the center of the
screen and x and y in pixels.  The grab point can be changed with
option: lblo= (e.g., 0 means lower left).  The tiffs can be resized
by specifying their desired height (like text fontsize) in pixels
(option: size=).

Simple text color numbers (option: color=) are: 0=black, 1=white,
2=red, 4=orange, 6=yellow, 8=green, 11=blue, 13=purple, 17-24=grays.

Here is an example scenario file (the line beginning with "#" is a
comment) demonstrating the main features:

============== cut here ====================================
#SOA  dur  stimtype=value    [optional arguments ...]
2000 1000  text="Get Ready"   xoff=0     yoff=0   color=8 +
           snd=GetReady.mp3
 500  250  text=Ready
 250   16  rgb=face1.tiff     xoff=-50   yoff=0   size=200
1000 1000  pgi=bgrect.pgi +
           rgb=face1.tiff     xoff=50    yoff=10  size=150 +
           rgb=face2.tiff     xoff=-150  yoff=10  size=150
1000 1000  text="Which face?" xoff=0     yoff=0   lblo=5
1000  100  text="100 ms ttl pulse on bitnum 9" +
           ttl=9 
============== cut here ====================================

The continuation lines are indented for clarity but this is not
required.

Here is example pgi-file code to draw one centered filled yellow
rectangle.  The 'grab' point for rectangles in a pgi file is always
the lower left corner:

====== cut here ======
moveto -50 -50
setrgbcolor 255 255 0
frect 100 100
====== cut here ======

A full specification of the extended Hillyard/Kutas scenario file
syntax can be obtained from typing 'mapper'.

All images are loaded into memory before starting.  A scenario file
with a new image for each 1/60 sec frame will be displayed correctly.
With 8G RAM, you can load about 30,000 unique 320x240 tiffs into
RAM (about 500 seconds of unique 1/60 sec tiffs).

Here are some other mapper options relevant to -stimtype 60:

  -fullscreen
  -exptfontsize 30
  -tiffdir faces
  -fontfile luxisb.ttf
  -fontfile2 SILDoulosIPA.ttf
  -fixtype -1

#######################################################################
Arcane details (shared libs used, overridden by [DY]LD_LIBRARY_PATH)
#######################################################################
The mapper binary uses standard shared libraries.  Both Darwin and
Linux versions have statically compiled-in libraries for freetype-2.4.11,
ftgl-2.1.3, and libtiff-3.8.2 to avoid compatibility problems.

Here are example shared-lib dependencies of mapper (Mac OS X 10.6.8
and CentOS 5.9 32-bit).  Note that [DY]LD_LIBRARY_PATH will override
the default libfreetype paths below:

linux % ldd mapper (on 32-bit, LD_LIBRARY_PATH unset)
  linux-gate.so.1 =>  (0x00f8f000)
  libz.so.1 => /lib/libz.so.1 (0x0059a000)
  libbz2.so.1 => /usr/lib/libbz2.so.1 (0x052c3000)
  libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00cc2000)
  libGL.so.1 => /usr/lib/libGL.so.1 (0x00b45000)
  libGLU.so.1 => /usr/lib/libGLU.so.1 (0x005cb000)
  libX11.so.6 => /usr/lib/libX11.so.6 (0x006c4000)
  libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x04dcc000)
  libm.so.6 => /lib/libm.so.6 (0x00568000)
  libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00dd6000)
  libc.so.6 => /lib/libc.so.6 (0x00409000)
  libXext.so.6 => /usr/lib/libXext.so.6 (0x007c9000)
  libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0x05364000)
  libpthread.so.0 => /lib/libpthread.so.0 (0x005af000)
  libdl.so.2 => /lib/libdl.so.2 (0x00593000)
  libdrm.so.2 => /usr/lib/libdrm.so.2 (0x00ac2000)
  libXau.so.6 => /usr/lib/libXau.so.6 (0x00676000)
  libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x0067b000)
  /lib/ld-linux.so.2 (0x003ea000)

darwin % otool -L mapper
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
  /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
  /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5)
  /usr/X11/lib/libGL.1.dylib (compatibility version 1.2.0, current version 1.2.0)
  /usr/X11/lib/libGLU.1.dylib (compatibility version 1.3.0, current version 1.3.0)
  /usr/X11/lib/libX11.6.dylib (compatibility version 9.0.0, current version 9.0.0)
  /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
  /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.44.0)
  /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
  /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)

############################################################################
HOWTO install Mac OS X 10.4 X11.app alongside early 10.5 X11 (and HOWTO undo)
############################################################################
--only relevant for Mac OS X 10.5!
--from Ben Byer @ apple, XDarwin maintainer
--http://lists.apple.com/archives/x11-users/2007/Nov/msg00005.html
--marty: fix typos in commands (extra spaces), missing cd, added 10.5.5 update
--X11 fullscreen works again in Mac 10.5.8
### Download X11 Update 2006 from apple:
  http://www.apple.com/support/downloads/x11update2006113.html
  [Finder mount X11Update2006.dmg]
### in Terminal
  [quit any running X11's]
  sudo launchctl unload -w /System/Library/LaunchAgents/org.x.X11.plist
    [or, on 10.5.5]
  sudo launchctl unload -w /System/Library/LaunchAgents/org.x.startx.plist
  sudo mv /Applications/Utilities/X11.app \
          /Applications/Utilities/X11-launcher.app
  sudo rm /usr/X11R6
  sudo ditto -Vx --noqtn \
    /Volumes/X11\ Update\ 2006/X11Update2006.pkg/Contents/Archive.pax.gz \
    /
  [log out, then back in to clear $DISPLAY]

Both version are now installed. To run the Tiger (10.4) version of
X11 with working fullscreen, run /Applications/Utilities/X11.app
and set preferences to full screen (X11-Preferences->Output->Enable
enter fullscreen).  To get back to Apple screen from 10.4 fullscreen
X11, alt-cmd-A.  To run the Leopard (10.5) version, run /usr/X11/X11.app
or /Applications/Utilities/X11-launcher.app.  It will now give a
harmless double X11 icon in Dock.  To reverse the above directions:

### in Terminal
  [quit any running X11's]
  sudo rm -rf /etc/X11 /usr/X11R6 /Applications/Utilities/X11.app
  cd /usr
  sudo ln -s X11 X11R6
  sudo mv /Applications/Utilities/X11-launcher.app \
          /Applications/Utilities/X11.app
  sudo launchctl load -w /System/Library/LaunchAgents/org.x.X11.plist
    [or, on 10.5.5]           
  sudo launchctl load -w /System/Library/LaunchAgents/org.x.startx.plist
  [log out, then back in to set $DISPLAY]