Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Installation based on wiki instructions

...

Make sure the VM has been customized, especially setting the shell to tcsh, and changing the /usr/local permissions.

  • Download and copy installation file to /usr/local
  • Unpack: open a terminal, nagivation to /usr/local, tar xzvf freesurfer....
  • Copy the .license file to the /usr/local/freesurfer directory
  • Edit the .tcshrc file to add the environment variables, including pointing SUBJECTS_DIR to LinuxShare, so your file might look like this:

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

setenv FSL_DIR $FSLDIR
setenv FREESURFER_HOME /usr/local/freesurfer
source $FREESURFER_HOME/SetUpFreeSurfer.csh
setenv SUBJECTS_DIR /mnt/hgfs/LinuxShare/subjects4freesurfer

Note that "FSL_DIR" is a FreeSurfer variable, which is why it is not duplicate the the FSL "FSLDIR".

...

, but Ubuntu has specific issues

Ubuntu

Startup

tcsh

chsh -s /bin/tcsh

(sudo apt install tcsh if needed)

log out, log in and open terminal

gedit .tcshrc

...

https://surfer.nmr.mgh.harvard.edu/fswiki/SetupConfiguration_Linux

Bash - don;'t use

There are multiple startup files in bash. Seems like the one that works is “.bashrc” as opposed .bash_login, .bash_profile etc.

  • Open terminal

  • Go to home directory (cd ~)

  • gedit .bashrc

  • add these three lines:

    Code Block
    languagebash
    export FREESURFER_HOME=/usr/local/freesurfer
    # Do custom SUBJECTS_DIR first, as FS startup will set to default if missing
    export SUBJECTS_DIR=/mnt/hgfs/LinuxShare/subjects4freesurfer
    source $FREESURFER_HOME/SetUpFreeSurfer.sh
  • save and restart terminal; test by running “freeview”

...

Permissions

brain@ubuntu:~$ sudo chmod -R a+w $SUBJECTS_DIR

…but I could not copy .license file, so I just gave up:

brain@ubuntu:~$ sudo chmod 777 $FREESURFER_HOME

VMware shares not working

Looking around I found that I can access the shares by manually executing:

vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other

However, I have been using shared folders in linux hosts since VMWare 11 and never had to manually mount. Guess I will have to set this up on /etc/fstab as follows:

.host:/ /mnt/hgfs fuse.vmhgfs-fuse allow_other 0 0

At least the actual shared folder functionality does work, which is what I was worried about.

qdec - deprivated (great :-()

If get following error, install library:

sudo apt install libjpeg62

Re: [Freesurfer] Freeview.bin - error while loading shared libraries: libvtkverdict.so.5.6 cannot open sharted ...

zkaufman Mon, 21 Sep 2015 21:06:39 -0700

Code Block
Hello,

This is a known when running freesurfer on Ubuntu systems. The solution is
addressed in the FAQ section on the frresurfer download page:
Code Block
  https://surfer.nmr.mgh.harvard.edu/fswiki/Download

pecifically, the solution is to go into you system's lib directory and
create a symlink as follows:

  $> cd /usr/lib/x86_64 (or something similar depending upon exact version)
  $> sudo ln -s libjpeg.so.8 libjpeg.so.62
  $> sudo ln -s libtiff.so.4 libtiff.so.3

This should solve it. Best,

-Zeke