1. Freesurfer Course Personal Laptop Setup
This page describes how to setup a personal laptop for usage in the Freesurfer course. Note that these instructions are targeted at Mac users, but its possible to use a Linux laptop, assuming you know how to adapt the instructions below.
1.0.1. Hardware/Software Requirements
- Macbook Pro (not an Air, whose graphics doesnt seem compatible with freeview and qdec)
- 17" screen (15" is ok, but stuff gets crowded really quickly)
- 4GB ram (2GB is ok, but some freeview commands might fail or run very slowly)
- Leopard (10.5) or Snow Leopard (10.6)
- 3-button mouse (the Apple mouse can be made to run in 3-button mode, but its tricky)
- an account with Admin privileges (this is default for the first account created on a Mac)
1.0.2. Setup
in Firefox or Safari (or your browser), bookmark or set homepage to: http://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial
change your default terminal to 'tcsh' by going to System Preferences -> Users & Groups, click the lock to make changes, then right click on your user name, select 'Advanced Options', then select /bin/tcsh under 'Login Shell'.
- drag the 'Terminal' application from the Applications/Utilities folder to your dock. you will use this often. Confirm that tcsh is your default shell by opening Terminal and typing 'ps'. You should see 'tcsh' under the CMD list.
- create a .cshrc file in your home directory containing the following. first type 'cd', to make sure you are in your home dir. then type:
pico .cshrc
then copy and paste the following text into the editor:
# exit if not an interactive shell if ($?USER == 0 || $?prompt == 0) exit alias dir "ls -alF" xset b off setenv PATH "/sbin:/usr/sbin:/usr/local/bin":"$PATH" if ( -e $HOME/bin) then setenv PATH "$HOME/bin":"$PATH" endif # define path to mac mini server NFS mount of apps and data. set MYOS=(leopard) set NFSAPPS=(/mnt/macmini/apps) set MYNAME=(gust) set NFSDATA=(/mnt/macmini/RW_tutorial_data) # # FSL # if ( -e $NFSAPPS/$MYOS/fsl) then setenv FSLDIR $NFSAPPS/$MYOS/fsl else if ( -e /usr/local/fsl) then setenv FSLDIR /usr/local/fsl endif endif # # Freesurfer and FS-FAST # # data... if ( -e $NFSDATA/$MYNAME/buckner_data ) then setenv TUTORIAL_DATA $NFSDATA/$MYNAME else if ( -e /Applications/freesurfer/subjects/buckner_data/tutorial_subjs ) then setenv TUTORIAL_DATA /Applications/freesurfer/subjects endif endif if ( $?TUTORIAL_DATA ) then setenv SUBJECTS_DIR $TUTORIAL_DATA/buckner_data/tutorial_subjs setenv FSFTUTDIR $TUTORIAL_DATA/fsfast-tutorial.subjects endif # binaries... if ( -e $NFSAPPS/$MYOS/freesurfer/SetUpFreeSurfer.csh ) then setenv FREESURFER_HOME $NFSAPPS/$MYOS/freesurfer else if ( -e /Applications/freesurfer/SetUpFreeSurfer.csh ) then setenv FREESURFER_HOME /Applications/freesurfer endif endif # setup... if ( $?FREESURFER_HOME ) then setenv FSF_OUTPUT_FORMAT nii.gz source $FREESURFER_HOME/SetUpFreeSurfer.csh echo "FSFTUTDIR $FSFTUTDIR" endif # # MATLAB # if ( -e $NFSAPPS/matlab/bin ) then setenv MATLABPATH $NFSAPPS/matlab else if ( -e /usr/local/matlab/bin ) then setenv MATLABPATH /usr/local/matlab endif endif if ( $?MATLABPATH ) then setenv PATH "$MATLABPATH/bin":"$PATH" endif # # Diffusion Toolkit and TrackVis # if ( -e $NFSAPPS/$MYOS/dtk ) then setenv DTK_HOME $NFSAPPS/$MYOS/dtk else if ( -e /usr/local/dtk ) then setenv DTK_HOME /usr/local/dtk endif endif if ( $?DTK_HOME ) then setenv PATH "$PATH":"$DTK_HOME" endif
- in this .cshrc file, change MYNAME from 'gust' to your username, or the name given to you to use by one of us.
- save the file with Control-O, then Control-X
optionally install Freesurfer by downloading the .dmg file from here. you dont need to modify the .cshrc file you just created. dont forget to get the .license file.
- close the Terminal and open a new one. you should see text like this:
-------- freesurfer-Darwin-leopard-i686-stable-pub-v5.1.0 -------- Setting up environment for FreeSurfer/FS-FAST (and FSL) FREESURFER_HOME /mnt/macmini/apps/leopard/freesurfer FSFAST_HOME /mnt/macmini/apps/leopard/freesurfer/fsfast FSF_OUTPUT_FORMAT nii.gz SUBJECTS_DIR /mnt/macmini/RW_tutorial_data/gust/buckner_data/tutorial_subjs MNI_DIR /mnt/macmini/apps/leopard/freesurfer/mni FSL_DIR /mnt/macmini/apps/leopard/fsl FSFTUTDIR /mnt/macmini/RW_tutorial_data/gust/fsfast-tutorial.subjects
actually, you will only see the /mnt/macmini path when connected at the course. otherwise, you will see /Applications/freesurfer.
- now to you need to create the directory used to mount our server. to do that, open a terminal and type:
cd / sudo mkdir -p /mnt/macmini
you will be prompted for your user password.
now you need to configure your Mac to NFS mount our server when its connected to our network. to do that, open Applications->Utilities->Disk Utilities. then click on File->NFS Mounts... click the + icon. in the 'Remote NFS URL box, type:
nfs://192.168.2.1:/Users/Shared
and in the Mount location box, type:
/mnt/macmini
then click Verify. it will say that it cant find it, but thats ok, just continue without verifying. we'll check that it works at the start of the course.
That is all. We can also do this the day of the course. Note that the .cshrc file will direct all binaries and data to use our mac mini server, so you dont need to install Freesurfer if you dont want to. Its also possible for you to copy all the tutorial data to your local hard disk if you want to take it home with you. It consumes 55GB though.