Thanks Gari for the suggestion! I unchecked the "Authenticate connections" button in X11, and ran the setenv and source commands again, and everything seemed to work as it should.

[Melissas-iMac:/Applications] mlancaster% setenv FREESURFER_HOME /Applications/freesurfer
[Melissas-iMac:/Applications] mlancaster% source $FREESURFER_HOME/SetUpFreeSurfer.csh
-------- freesurfer-Darwin-leopard-i686-stable-pub-v5.1.0 --------
Setting up environment for FreeSurfer/FS-FAST (and FSL)
FREESURFER_HOME   /Applications/freesurfer
FSFAST_HOME       /Applications/freesurfer/fsfast
FSF_OUTPUT_FORMAT nii.gz
SUBJECTS_DIR      /Applications/freesurfer/subjects
MNI_DIR           /Applications/freesurfer/mni


tkmedit and tksurfer appear toto work, but with tkmedit I got the following errors:

[Melissas-iMac:/Applications/freesurfer/subjects] mlancaster% tkmedit bert orig.mgz
Couldn't create output file .xdebug_tkmeditReading /Applications/freesurfer/tktools/tkm_common.tcl


When I tried to test the cortical segmentation I got the following error:

% tkmedit bert norm.mgz -segmentation aseg.mgz $FREESURFER_HOME/FreeSurferColorLUT.txt
can't read "FREESURFER_HOME": no such variable
% tksurfer bert rh pial
Couldn't create output file .xdebug_tksurfersubject is bert
hemi    is rh
surface is pial
surfer: current subjects dir: /Applications/freesurfer/subjects
surfer: not in "scripts" dir ==> using cwd for session root
surfer: session root data dir ($session) set to:
surfer:     /Applications/freesurfer/subjects
surfer: can't create file surfer.log in cwd
surfer: surfer.log created in /tmp
surfer: session root data dir ($session) reset to:
surfer:     /tmp
checking for nofix files in 'pial'
Reading image info (/Applications/freesurfer/subjects/bert)
Reading /Applications/freesurfer/subjects/bert/mri/orig.mgz
surfer: Reading header info from /Applications/freesurfer/subjects/bert/mri/orig.mgz
surfer: vertices=132934, faces=265864
surfer: single buffered window

And the following errors with recon-all:

% recon-all -s bert -autorecon1
ERROR: you do not have write permission to /Applications/freesurfer/subjects/bert
child process exited abnormally
% sudo recon-all -s bert -autorecon1
dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid
Password:
FREESURFER_HOME: Undefined variable.
child process exited abnormally

I dont understand why  FREESURFER_HOME is not recognized. Thanks again to anyone for any suggestions!!

-Missy


On Fri, Sep 14, 2012 at 9:00 AM, Garikoitz Lerma Usabiaga <garikoitz@gmail.com> wrote:
I Melissa,
I had the same problem, I solved it this way:

in Xquartz go to preferences (cmd+,), and uncheck the first checkbox in the Security tab:



hope it helps!
Gari 



On 2012-09-13, at 16:19, Melissa Lancaster <melissa.lancaster@my.rfums.org> wrote:


Dr. Fischl,

Thanks so much. Unfortunately, I had closed the window. But here is what happened:

I set the environment: setenv FREESURFER_HOME /Applications/freesufer

However, after typing the next command: source $FREESURFER_HOME/SetUpFreeSurfer.csh I got the following error:

FREESURFER_HOME: Undefined variable. 

I found an old post on the listserv with a similar problem, and directly copied the setenv command you had sent back to that user. I then got the source command to work, and the output was in line with what the installation website said I should get.  Of note, at that time, I used a regular terminal window, I believe.

A friend told me to 'echo $FREESURFER_HOME' to see what the path is currently set at. When I do that, I get a blank space. 

Thanks so much for the help!!! 

-Missy



On Thu, Sep 13, 2012 at 8:12 AM, Bruce Fischl <fischl@nmr.mgh.harvard.edu> wrote:
Hi Missy,

yes, that sounds like at least part of your problem. What trouble did you have sourcing our env file? Can you send us the screen output?


Bruce
On Wed, 12 Sep 2012, Melissa Lancaster wrote:

Hi again-

I should have added that I am using Mountain Lion. I have downloaded Quartz
and when I work from an X11 window I get:
tkmedit: command not found

I had difficulty with the source command when setting up the FREESURFER_HOME
directory but eventually got it to work...not sure if this could have
something to do with it.

Thanks again!!!
-Missy

On Wed, Sep 12, 2012 at 10:46 PM, Melissa Lancaster
<melissa.lancaster@my.rfums.org> wrote:
      Hi,

It seemed I had successful installed Freesufer, but when I went to run
the tests I got errors with both tkmedit and tksurfer.

when typing <tkmedit bert orig.mgz> I got the following error: 

Couldn't create output file .xdebug_tkmeditGLUT: Fatal Error in
tkmedit.bin: could not open display:

when typing <tksurfer bert rh pial> I got the following error:
GLUT: Fatal Error in tksurfer.bin: could not open display:


Any advice?

Thanks,
Melissa






The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



--
Melissa A. Lancaster, M.S.
Clinical Psychology Doctoral Student
Rosalind Franklin University of Medicine and Science




--
Melissa A. Lancaster, M.S.
Clinical Psychology Doctoral Student
Rosalind Franklin University of Medicine and Science

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.




--
Melissa A. Lancaster, M.S.
Clinical Psychology Doctoral Student
Rosalind Franklin University of Medicine and Science