Hi Krishna and David,
I don't know what FreeSurfer env var might be doing this,
so it is hard to reply to unless I see it. However in the few
cases that I have used FreeSurfer in the past, I would put
those initialization variable in a script and ONLY set them
when I was about to use FreeSurfer.
They set a bunch of variables and manipulate the PATH
(which seems evil to me).
I would not run AFNI under a FreeSurfer environment.
On the flip side, I would consider looking into this to see
exactly what is going on. Is it enough to just run their
init script and then use afni_proc.py?
- rick