AFNI install question

Hello,

I’m having some trouble installing AFNI. I’m running Ubuntu in a terminal in Windows 10. I’m also a beginner to both AFNI and Unix/Linux.

Here is the output for rPkgsInstall -pkgs ALL


-------------------------------- general ---------------------------------                                              architecture:         64bit ELF                                                                                         system:               Linux                                                                                             release:              4.4.0-17763-Microsoft                                                                             version:              #864-Microsoft Thu Nov 07 15:22:00 PST 2019                                                       distribution:         Ubuntu 16.04 xenial                                                                               number of CPUs:       8                                                                                                 apparent login shell: bash                                                                                              shell RC file:        .bashrc (exists)                                                                                                                                                                                                          --------------------- AFNI and related program tests ---------------------                                              which afni           : /home/bo/abin/afni                                                                               afni version         : Precompiled binary linux_ubuntu_16_64: Aug 29 2019                                                                    : AFNI_19.2.21 'Claudius'                                                                          AFNI_version.txt     : AFNI_19.2.21, linux_ubuntu_16_64, Aug 29 2019                                                    which python         : /usr/bin/python                                                                                  python version       : 2.7.12                                                                                           which R              : /usr/bin/R                                                                                       R version            : R version 3.6.1 (2019-07-05) -- "Action of the Toes"                                             which tcsh           : /usr/bin/tcsh                                                                                                                                                                                                            instances of various programs found in PATH:                                                                                afni    : 1   (/home/bo/abin/afni)                                                                                      R       : 1   (/usr/bin/R)                                                                                              python  : 1   (/usr/bin/python2.7)                                                                                      python2 : 1   (/usr/bin/python2.7)                                                                                      python3 : 1   (/usr/bin/python3.5)                                                                                                                                                                                                                                                                                                                                  testing ability to start various programs...                                                                                afni                 : success                                                                                          suma                 : success                                                                                          3dSkullStrip         : success                                                                                          uber_subject.py      : success                                                                                          3dAllineate          : success                                                                                          3dRSFC               : success                                                                                          SurfMesh             : success                                                                                          3dClustSim           : success                                                                                          3dMVM                : success                                                                                                                                                                                                              checking for R packages...                                                                                                  rPkgsInstall -pkgs ALL -check : success                                                                                                                                                                                                     R RHOME : /usr/lib/R                                                                                                                                                                                                                            checking for $HOME files...                                                                                                 .afnirc                   : found                                                                                       .sumarc                   : found                                                                                       .afni/help/all_progs.COMP : found                                                                                                                                                                                                           ------------------------------ python libs -------------------------------                                              ++ module loaded: PyQt4                                                                                                    module file : /usr/lib/python2.7/dist-packages/PyQt4/__init__.pyc                                                                                                                                                                            ** failed to load module matplotlib.pyplot                                                                              -- matplotlib.pyplot is not required, but is desirable                                                                                                                                                                                          -------------------------------- env vars --------------------------------                                              PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.Ubuntu16.04onWindows_1604.2019.523.0_x64__79rhkp1fndgsc:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/iCLS:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/iCLS:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Users/bochao/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files/Bandizip:/snap/bin:/home/bo/abin:/home/bo/abin:/home/bo/abin:/home/bo/abin:/home/bo/abin:/home/bo/abin                                                                                                                                         PYTHONPATH =                                                                                                            R_LIBS = /home/bo/R                                                                                                                                                                                                                             LD_LIBRARY_PATH =                                                                                                       DYLD_LIBRARY_PATH =                                                                                                     DYLD_FALLBACK_LIBRARY_PATH =                                                                                                                                                                                                                    ------------------------------ data checks -------------------------------                                              data dir : found AFNI_data6   under $HOME                                                                                          top history: ...2019 [ptaylor]: updated FT_analysis/results.QC_FT.05                                         data dir : found AFNI_demos   under $HOME                                                                                          top history: 22 Oct 2019 [discoraj]: added Cluster Explorer Demo                                             data dir : found suma_demo    under $HOME                                                                                          top history: ...s_New/data/Build_tmp on Mon Mar  4 11:56:45 EST 2013                                         data dir : found afni_handouts under $HOME                                                                              atlas    : found TT_N27+tlrc  under /home/bo/abin                                                                                                                                                                                               ------------------------------ OS specific -------------------------------                                              which apt-get        : /usr/bin/apt-get                                                                                 apt-get version      : apt 1.2.31 (amd64)                                                                                                                                                                                                       have Ubuntu system: Ubuntu 16.04 xenial                                                                                 have Ubuntu afni  : Precompiled binary linux_ubuntu_16_64: Aug 29 2019                                                                                                                                                                          =========================  summary, please fix:  =========================                                              *  login shell 'bash', trusting user to translate code examples from 'tcsh'                                                                                                                                                                     bo@DESKTOP-MRDNLP6:~$ grep bionic /etc/apt/sources.list                                                                 bo@DESKTOP-MRDNLP6:~$ afni_system_check.py -check_all                                                                   -------------------------------- general ---------------------------------                                              architecture:         64bit ELF                                                                                         system:               Linux                                                                                             release:              4.4.0-17763-Microsoft                                                                             version:              #864-Microsoft Thu Nov 07 15:22:00 PST 2019                                                       distribution:         Ubuntu 16.04 xenial                                                                               number of CPUs:       8                                                                                                 apparent login shell: bash                                                                                              shell RC file:        .bashrc (exists)                                                                                                                                                                                                          --------------------- AFNI and related program tests ---------------------                                              which afni           : /home/bo/abin/afni                                                                               afni version         : Precompiled binary linux_ubuntu_16_64: Aug 29 2019                                                                    : AFNI_19.2.21 'Claudius'                                                                          AFNI_version.txt     : AFNI_19.2.21, linux_ubuntu_16_64, Aug 29 2019                                                    which python         : /usr/bin/python                                                                                  python version       : 2.7.12                                                                                           which R              : /usr/bin/R                                                                                       R version            : R version 3.6.1 (2019-07-05) -- "Action of the Toes"                                             which tcsh           : /usr/bin/tcsh                                                                                                                                                                                                            instances of various programs found in PATH:                                                                                afni    : 1   (/home/bo/abin/afni)                                                                                      R       : 1   (/usr/bin/R)                                                                                              python  : 1   (/usr/bin/python2.7)                                                                                      python2 : 1   (/usr/bin/python2.7)                                                                                      python3 : 1   (/usr/bin/python3.5)                                                                                                                                                                                                                                                                                                                                  testing ability to start various programs...                                                                                afni                 : success                                                                                          suma                 : success                                                                                          3dSkullStrip         : success                                                                                          uber_subject.py      : success                                                                                          3dAllineate          : success                                                                                          3dRSFC               : success                                                                                          SurfMesh             : success                                                                                          3dClustSim           : success                                                                                          3dMVM                : success                                                                                                                                                                                                              checking for R packages...                                                                                                  rPkgsInstall -pkgs ALL -check : success                                                                                                                                                                                                     R RHOME : /usr/lib/R                                                                                                                                                                                                                            checking for $HOME files...                                                                                                 .afnirc                   : found                                                                                       .sumarc                   : found                                                                                       .afni/help/all_progs.COMP : found                                                                                                                                                                                                           ------------------------------ python libs -------------------------------                                              ++ module loaded: PyQt4                                                                                                    module file : /usr/lib/python2.7/dist-packages/PyQt4/__init__.pyc                                                                                                                                                                            ** failed to load module matplotlib.pyplot                                                                              -- matplotlib.pyplot is not required, but is desirable                                                                                                                                                                                          -------------------------------- env vars --------------------------------                                              PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.Ubuntu16.04onWindows_1604.2019.523.0_x64__79rhkp1fndgsc:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/iCLS:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/iCLS:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Users/bochao/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files/Bandizip:/snap/bin:/home/bo/abin:/home/bo/abin:/home/bo/abin:/home/bo/abin:/home/bo/abin:/home/bo/abin                                                                                                                                         PYTHONPATH =                                                                                                            R_LIBS = /home/bo/R                                                                                                                                                                                                                             LD_LIBRARY_PATH =                                                                                                       DYLD_LIBRARY_PATH =                                                                                                     DYLD_FALLBACK_LIBRARY_PATH =                                                                                                                                                                                                                    ------------------------------ data checks -------------------------------                                              data dir : found AFNI_data6   under $HOME                                                                                          top history: ...2019 [ptaylor]: updated FT_analysis/results.QC_FT.05                                         data dir : found AFNI_demos   under $HOME                                                                                          top history: 22 Oct 2019 [discoraj]: added Cluster Explorer Demo                                             data dir : found suma_demo    under $HOME                                                                                          top history: ...s_New/data/Build_tmp on Mon Mar  4 11:56:45 EST 2013                                         data dir : found afni_handouts under $HOME                                                                              atlas    : found TT_N27+tlrc  under /home/bo/abin                                                                                                                                                                                               ------------------------------ OS specific -------------------------------                                              which apt-get        : /usr/bin/apt-get                                                                                 apt-get version      : apt 1.2.31 (amd64)                                                                                                                                                                                                       have Ubuntu system: Ubuntu 16.04 xenial                                                                                 have Ubuntu afni  : Precompiled binary linux_ubuntu_16_64: Aug 29 2019                                                                                                                                                                          =========================  summary, please fix:  =========================                                              *  login shell 'bash', trusting user to translate code examples from 'tcsh'                                                                                                                                                                     bo@DESKTOP-MRDNLP6:~$                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              

Meanwhile, I have tried


echo "" >> ~/.bash_profile
echo "source ~/.bashrc" >> ~/.bash_profile
echo "" >> ~/.bash_profile

the AFNI still does’t work.

the initial interface is this


Precompiled binary linux_ubuntu_16_64: Aug 29 2019 (Version AFNI_19.2.21 'Claudius')                                                                                                                                                                                                                                                                                    ** Version check disabled: AFNI_VERSION_CHECK forbids                                                                   Thanks go to V Roopchansingh for great efforts                                                                                                                                                                                                  Initializing: X11Error: Can't open display:                                                                             ++ AFNI is detached from terminal.

I’d appreciate if you give any suggestions I can do!!!
Thank you very much!

Hi-

Your system check results actually look good to me (there is a bit of odd formatting in the Message Board post, but I copy+pasted those into a text editor to view them). I think the only thing you have in the bottom “please fix” section is this:


login shell 'bash', trusting user to translate code examples from 'tcsh'

… which actually isn’t a problem that needs fixing, it is just informational about your terminal shell.

I believe you are running the Windows Subsystem Linux; I am going to guess that you get an error message about a “display error” and “0:0”… is that right?
In order to open “afni” or “suma” windows, you need to have a separate x-server installed. We have instructions for that here on the install page-- it is called vcXsrv:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/background_install/install_instructs/steps_windows10.html#install-vcxsrv-windows-x-server
You follow those instructions, and then you just have to remember to start the vcXsrv every time before opening an Ubuntu session. I know this seems a bit silly, but that is just the way Windows rolls (and it’s only a few clicks-- you just have to say ‘yes’/‘continue’ when starting the Xsrv).

–pt

Hi, I install Xlaunch in the computer and eventrually open up the afni.
Thanks for your reply and help !!!

I noticed that I have not copy and paste the follow code in the computer, it caused the afni can’t be launched.


echo "export DISPLAY=:0.0" >> ~/.bashrc
echo "setenv DISPLAY :0.0" >> ~/.cshrc
echo "export NO_AT_BRIDGE=1" >> ~/.bashrc
echo "setenv NO_AT_BRIDGE 1" >> ~/.cshrc

OK, great, glad that is sorted.

–pt