From the error message, I am guessing that you don't have an X11 client installed. Unlike previous versions, Mac OS X 10.8 doesn't ship with an X11 client. You will need to install XQuartz in order to run AFNI.
Download XQuartz here
It is identical to the X11 application that you used to run in Mac OS X 10.5/10.6.
From the webpage description:
Quote
The XQuartz project is an open-source effort to develop a version of the X.Org X Window System that runs on OS X. Together with supporting libraries and applications, it forms the X11.app that Apple has shipped with OS X since version 10.5.
Edited 1 time(s). Last edit at 09/09/2012 12:17AM by Peter Molfese.