FreeSurfer Installation in VM

Installation based on wiki instructions, 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:

    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

Hello, This is a known when running freesurfer on Ubuntu systems. The solution is addressed in the FAQ section on the frresurfer download page:
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