Scripts to smooth the install of afni on Ubuntu on Windows

Hello,
I recently had to automate installing AFNI on Ubuntu on Windows.

Here is the part of it that I can share in hopes that it makes life easier on someone else .
https://github.com/aaroneg/Install-AFNI-on-Ubuntu-on-Windows

I’ve mostly just taken the instructions, put them in scripts, and added some changes as required to make it work. There are some additional instructions for automatically mounting network storage inside your Ubuntu container.

At any rate, I hope someone finds it useful, feel free to reach out to me on github if you have any suggested changes.

Hi, Aaron-

Thanks for both doing this and posting your results here. We’ll try to find a Windows machine here (eek!) and take it for a spin.

Re. the choice of shell and our frequent use of tcsh-- we do have some scripts in bash and some in tcsh, and the latter is more popular locally mainly because of its relative readability. In general, we recommend setting up both bash and tcsh environments for AFNIing, and that is what our main instructions do. That way, whichever shell a user is using, they should be good to go.

Thanks,
pt

And it might also be useful to include instructions on your github page for setting up the ability to copy+paste into the Ubuntu terminals in Windows-- it took us a bit of digging on this, but the instructions are here:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/background_install/install_instructs/steps_windows10.html#install-prerequisite-vcxsrv-windows-x-server
(it involves clicking around, not scripting, but I would still consider it essential to have setup, for reasonable happiness of the user; I have no idea how that functionality is not on by default).

–pt

I appreciate the feedback, and I’d be delighted to update the documentation. This is the only reason I’ve ever had to visit the forums, and I’ll try to check back every so often. If you would like to make sure I see your updates, I’ll see it faster if you open an issue on github.

Thank you!

It looks like quickedit is on by default in Windows 10, release 1709, which is the release that I used to develop this, and the minimum version I’d recommend for using the linux subsystem for windows. I’ll still add a script or instructions for turning it on (it’s either several clicks or a one-line script)

The readme should now include a lot more information and background. Thanks!

Thanks for this. With the paid version of Xming, have you found if that works with either the whereami function in the AFNI or the AFNI Tips sheet (also available from the lower left of the AFNI GUI)? AFNI would crash with these HTML X11 windows on the free version of Xming, but worked fine with VcXsrv.

To be perfectly honest with you, I’m an IT guy and know nothing about afni other than “Hey! it looks like it’s running”, but I’ll get a vm running with it with our specific configuration and see if I can reproduce the issue.

It looks like the paid version is no better than the free version. I appreciate you bringing this to my attention. I’ve modified the readme to reflect this and only recommend VcXsrv.

On a side note, is there a command to re-try the

rPkgsInstall -pkgs ALL

command that only attempts to install missing R packages instead of reinstalling several .deb packages and adding the cran repo to ubuntu’s sources list every time? What I’m trying to speed up is the task of seeing whether i’ve added the correct deb packages to enable an R package to compile successfully, and every time I run that it adds an identical source to the list, which is not helpful.