Trouble with afni install X11 forwarding

I have typically used afni on a remote server using ssh, but I am installing a local version on my MacBook. I followed the instructions on the essential system setup for Mac. However, I’m running into trouble with opening the afni display in the Mac terminal. I get this error… “Error: Can’t open display” I set the environment variable as suggested in the error message, but it still isn’t working. XQuartz is running.

I confirmed that afni installed properly (afni -ver works fine), and the program launches fine if I run it through xterm in XQuartz.

My guess is that I’m missing a simple step, but I need help!


Sometimes XQuartz needs a reboot before it works seamlessly with the terminal. Try that and post the output of: -check_all

More info on that command here.