Installing FSL on Pop!_OS 20.04 LTS

Hi all,

I ran into a frustrating problem that I just found a solution for. I hope this post could help someone in a similar situation. I recently switched over to Pop!_OS 20.04 LTS from Ubuntu 20.04 LTS and in the process lost my FSL installation. Currently, the fslinstaller.py script does not support Pop!_OS. There is a way to trick it into running if you are having the same issue.

Source

WARNING make sure you run a backup prior to performing this hack… just in case.

  1. move your current OS information files into a temporary location:

    sudo mv /etc/os-release /etc/os-release.pop && sudo mv /etc/lsb-release /etc/lsb-release.pop
    
  2. write a new os-release file:

    sudo vim /etc/os-release
    

    copy the following into this file:

    NAME="Ubuntu"
    VERSION="20.04 LTS (Focal Fossa)"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 20.04 LTS"
    VERSION_ID="20.04"
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    VERSION_CODENAME=focal
    UBUNTU_CODENAME=focal
    
  3. write a new lsb-release file:

    sudo vim /etc/lsb-release
    

    copy the following into this file:

    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=20.04
    DISTRIB_CODENAME=focal
    DISTRIB_DESCRIPTION="Ubuntu 20.04 LTS"
    
  4. now run the fslinstaller.py script.

  5. after running, remove the files you wrote:

    sudo rm /etc/os-release && sudo rm /etc/lsb-release
    
  6. move the original files back:

    sudo mv /etc/os-release.pop /etc/os-release && sudo mv /etc/lsb-release.pop /etc/lsb-release
    

FSL is running on my system now.

Cheers,
Greydon

7 Likes

And there I was trying to modify the installer :slight_smile:

You saved my day. I was also trying to edit the installer.

Someone from FSL should re-work the installer to consider Pop…

Thanks!

Not all heroes wear capes… Thank you so much

After following you’re instruction I indeed had FSL installed but none of the aliases were working (fsl, flirt, bet, etc.) I can still lunch the tools if a direct path is given, any adive on how to solve it?

[SOLVED]

Bollettini, Irene. (2014). Re: FSL 5.0 GUI working fine but Command line not working - any suggestions?. Retrieved from: Cite this answer.

as @Bar mentioned, you may have to manually add the FSL directory to your PATH. Although, I thought the FSL script added the path automatically. Anyway, you need to add the following to your ~./profile (adjust the FSLDIR variable according to where you chose to install FSL):

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