Mac OS X and XQuartz -- redux

Teaching AFNI here at Wash U (St Louis), we’ve seen a few people with a peculiar problem: they can’t type into AFNI popup windows, such as “Jumpto xyz”.

The solution to this difficulty is to set an environment variable:

setenv DYLD_LIBRARY_PATH /opt/X11/lib/flat_namespace

which applies when you are using a new version of the XQuartz server program. I’ve not seen this symptom before.

The best place to set this variable is in your ~/.cshrc file, so that it gets set for every invocation of the shell. If you are using bash :-S then you will have to use a slightly different syntax to set the environment variable.

Bash syntax for people who like it:


export DYLD_LIBRARY_PATH=/opt/X11/lib/flat_namespace

or if you wish to just add it to the relevant files on a Mac:


echo "export DYLD_LIBRARY_PATH=/opt/X11/lib/flat_namespace" >> .bash_profile

or most variants of Linux:


echo "export DYLD_LIBRARY_PATH=/opt/X11/lib/flat_namespace" >> .bashrc

A couple of other symptoms also seem to be associated with this environment variable:

  1. 1dplot does not work;
  2. closing a child window of the AFNI controller crashes the controller.

Another work-around, though not ideal, is to install an older version of XQuartz. I finally did it this morning after being fed-up with the weird AFNI behavior (i.e. crash after closing a sub-window, etc).

Here is what I have:
OS X Yosemite v10.10.5
XQuartz 2.7.7

Note, this might have consequences for other software but I haven’t run into anything yet.

Andy

Setting DYLD_LIBRARY_PATH=/opt/X11/lib/flat_namespace seems to fix AFNI and 1dplot crashing issues.
I am using macOS 10.12.3 and XQuartz 2.7.11. Homebrew and AFNI macosx_10.10_icc are the latest version as of today.