[FSL] [TitleIndex] [WordIndex

Configuring your shell

If you have used the FSL installer your shell will have already been setup for running the FSL tools. However, there are situations where you may need to carry out this configuration by hand, for example when installing FSL on a multi-user computer. How you do this will depend on what shell you are using (see what shell am I using?).

BASH/sh/ksh

User shell setup is stored in a file called .bash_profile (BASH) or .profile (SH, KSH and sometimes BASH) in your home folder (eg ~/.bash_profile), you need to edit (or create) this file to add the following lines:

FSLDIR=`/usr/local/fsl`
. ${FSLDIR}/etc/fslconf/fsl.sh
PATH=${FSLDIR}/bin:${PATH}
export FSLDIR PATH

changing /usr/local/fsl to the directory path you installed FSL to.

csh/tcsh

User shell setup is stored in a file called .cshrc (csh and tcsh) or .tcsh (tcsh only) in your home folder (eg ~/.cshrc), you need to edit (or create) this file to add the following lines:

setenv FSLDIR /usr/local/fsl
source ${FSLDIR}/etc/fslconf/fsl.csh
setenv PATH ${FSLDIR}/bin:${PATH}

changing /usr/local/fsl to the directory path you installed FSL to.

Mac OS X 10.4 and X11 setup

By default Mac OS X 10.4's Terminal application cannot run X11 applications. To fix this, add the following to your .bash_profile or .cshrc files:

System-wide setup

You have several options for automatically setting up FSL for all users on the computer, all beyond the scope of this document, but here are some suggestions on how you might go about this.

  1. Change the template used for new user accounts (look in /etc/skel on Linux or /System/Library/User Template/English.lproj/ on Mac OS X). New users will then get a suitably modified settings file.

  2. Store the settings in an NFS shared folder. You could ensure that the default settings file looks for and sources a settings file on an NFS server. This is useful for a compute cluster as you only have to edit one file to have it change everywhere.
  3. Modify the system-wide .profile or .cscrc file. On Mac OS X the files /etc/profile and /etc/csh.cshrc control this for all users, on Linux you can create files fsl.sh and fsl.csh in /etc/profile.d containing the settings. If you are using the fsl_installer.sh script then you can carry out this configuration by running the script with the -E option (Linux only).

Take Care

Be careful what you put in these files as you could stop people logging in!


2012-09-05 11:30