Thank you Daniel.
I have an Intel-based MacBook and could open xterm but not AFNI.
Anyway, I have restarted my computer and I can open AFNI from both xterm and the terminal, something I tried many times before but couldn't make it work. I wonder if xQuartz got updated recently.