Skip to content

Mac vistasoft software configuration

Jonathan Winawer edited this page Aug 30, 2016 · 8 revisions

Below are some recommendations. You need not follow them exactly. They work well on the Winawer lab machines.

  • Tell your bash profile to read your .bashrc file each time the terminal is launched. This way the bashrc will be read irrespective of how you launch your terminal. See [http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html this page] for explanation of bashrc v bash_profile. The contents of our .bash_profile file are:
[ -a ~/.bashrc ] && source ~/.bashrc
  • Set Freesurfer paths in your .bashrc file. If you do not have a file, create one in your home directory. We do this as a function with the following contents of the .bashrc file:
# Source freesurfer and fsl paths
freesurfer()
{
        export SUBJECTS_DIR=/Volumes/server/Freesurfer_subjects; 
        export FREESURFER_HOME=/Applications/freesurfer; 
        source $FREESURFER_HOME/SetUpFreeSurfer.sh; 
        export FSLDIR=/usr/local/fsl; . ${FSLDIR}/etc/fslconf/fsl.sh;
        PATH=${FSLDIR}/bin:${PATH}; export FSLDIR PATH
}

Check it:

more ~/.bashrc
  • MATLAB command We create a text file called startMatlab.command. You can do this from a terminal like this:
cat > ~/Documents/startMatlab.command
#! /usr/bin/env bash -i
# Source freesurfer
#	 'freesurfer' is a function defined in ~/.bashrc
#     This will ensure that freesurfer paths are available to Matlab
freesurfer

# Start matlab 
/Applications/MATLAB.app/bin/matlab

Make sure this file is executable, for example by typing

chmod +x ~/Documents/startMatlab.command 

Clicking this file will then launch Matlab and preserve freesurfer paths

Clone this wiki locally