macOS: The App-based system setup

Welcome to the Jungle [1]

The following is a set of scripts packaged as an app. It is designed to automate the AFNI installation steps. You should launch the script by double clicking the icon like a regular program.

This app will download and install the recommended versions of the following:
  1. Xcode command line tools

  2. Xquartz

  3. R

  4. AFNI

If a package is already installed, you may be asked if you want to reinstall it. But you can skip it if you like. This script will also setup your ~/.cshrc, ~/.bashrc, and ~/.bash_profile. It will add the appropriate entries to your paths specified there. After completion, you should restart your computer just in case.

This is a BETA script, so your feedback is welcome. We have tested the app on 10.10 to 10.13 with various hardware.

If you are seeking the non-App version of install instructions, please see HERE.

Take the File and Run [2]

Break It Down Again [3]

  • Download the file and open it to extract or mount.

  • Read the README!!

  • Double click the “afni_macOS_install_10.7_BETA” or “afni_macOS_install_10.12_BETA” icon.

  • You may get a popup notification about an “unidentified developer”.

    ../../_images/unknown_dev_warning.png
    If so, you can continue by:
  • This will launch your terminal.

    Most of the rest of the interactions are in the terminal. If needed, the Xcode command line tools will popup an installation window. Once complete, return to the terminal to continue.

  • To accept the default options (shown in [ ]), just press Enter.

    For some sections, you may need to type in your password. If you are not an administrator on your computer, this installation may fail. Make sure you have permissions for the folder you choose for AFNI! The sudo prompt will time out after awhile, so this is not an unattended install.

  • This script does not install fink. Nor does it download the class data.

../../_images/apple_brain_color_flipped.png

The icon is a work in progress. If you have some design skills, please send me alternatives.

Install Netpbm

  1. Copy+paste:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
    
  2. Copy+paste:

    brew install netpbm
    

Purpose: Install “netpbm”, which has functionality for converting image formats (such as to PNG) and is used in several programs like @snapshot_volreg, @chauffeur_afni and others. Uses the package manager homebrew to do the installation.

Prepare for Bootcamp

  1. Copy+paste:

    curl -O https://afni.nimh.nih.gov/pub/dist/edu/data/CD.tgz
    tar xvzf CD.tgz
    cd CD
    tcsh s2.cp.files . ~
    cd ..
    

    Purpose: Download the Bootcamp class data; untar+unzip it (= open it up); move into the newly opened directory; execute a script to copy the files to $HOME/..

    If no errors occur in the above, and your afni_system_check.py says things are OK, you can delete/remove the tarred/zipped package, using “rm CD.tgz”. If you are really confident, you can also deleted the CD/ directory in the present location.

  2. !Pro tip!: Bring a computer mouse to use at the Bootcamp. It is muuuuch easier to follow the demos that way.

  3. Read+practice with the handy Unix documentation/tutorial.

    Purpose: give you a quick lesson/refresher on using basic Linux shell commands (e.g., ls, cd, less, etc.). It will greatly enhance your bootcamp experience– we promise!

Evaluate setup/system (important!)

  1. Open a new terminal, and then copy+paste:

    afni_system_check.py -check_all
    
  2. Read the “Please Fix” section at the end. If there are no suggestions, then rejoice! Otherwise, try the suggestion(s) there.

  3. Open up the AFNI and SUMA GUIs, juuuust to make sure all is well:

    afni
    suma
    

Report any crashes or problems!

If stuck, then …

  • try searching online with the error message, and/or ask on the Message Board

  • send the system check to an AFNI guru for advice—copy+paste:

    afni_system_check.py -check_all > out.ASC.txt
    

    ... and email the file “out.ASC.txt”.

Niceify terminal (optional, but goood)

To improve your life when using the terminal, copy+paste these:

echo 'set filec'    >> ~/.cshrc
echo 'set autolist' >> ~/.cshrc
echo 'set nobeep'   >> ~/.cshrc

echo 'alias ls ls -G'       >> ~/.cshrc
echo 'alias ll ls -lG'      >> ~/.cshrc
echo 'alias ltr ls -lGtr'   >> ~/.cshrc
echo 'alias ls="ls -G"'     >> ~/.bashrc
echo 'alias ll="ls -lG"'    >> ~/.bashrc
echo 'alias ltr="ls -lGtr"' >> ~/.bashrc
echo 'alias ls="ls -G"'     >> ~/.zshrc
echo 'alias ll="ls -lG"'    >> ~/.zshrc
echo 'alias ltr="ls -lGtr"' >> ~/.zshrc

Purpose: The first command block sets up tab autocompletion for tcsh (which should already be enabled for bash users by default). The second set of commands make aliases for the main shells so that different types of files (“normal” files, zipped files, executables, et al.) and directories are shown using different colors and boldness. It makes it much easier to navigate on a terminal, IMHO.

Keep up-to-date (remember!)

  1. To update your AFNI sometime, copy+paste:

    @update.afni.binaries -d
    

    That’s it!!

    Purpose: This will automatically download the correct, latest AFNI version to your computer, replacing your old binaries. It will also update the apearch help information. Update often!

  2. To check your AFNI version, copy+paste:

    afni -ver
    

    Purpose: Report this useful info whenever asking a question on the Message Board!

Note

The record of all changes (new options, new programs, bug fixes, et al.) in AFNI programs is maintained for all to see in the online AFNI History.

Footnotes