AFNI GUI Won't Launch


I just installed AFNI for the first time (Windows) using the instructions here:

I have already installed Xlaunch previously and used that for FSL without issue. However, when I type “afni” in the shell, I am met with the below error. Does anyone know of a solution? Thanks!

Initializing: X11Error: Can’t open display: :0.0
++ AFNI is detached from terminal.

I tried to answer in your previous post here:

Dear @JayBro94

An alternative to running AFNI in WSL with a local Xserver is to use our open-source Neurodesk project :slight_smile: It provides many neuroimaging tools (including afni) in a single software container and makes it all easily accessible :slight_smile:

You can start Neurodesk in Windows like this:

docker run --shm-size=1gb -it --privileged --name neurodesktop -v C:/neurodesktop-storage:/neurodesktop-storage -p 8080:8080 -h neurodesktop-20220701 vnmd/neurodesktop:20220701

and then you can open Neurodesktop in your browser and start AFNI from the Application’s menu:

You can also test Neurodesk first via this link which runs neurodesk on our cloud infrastructure:

1 Like

Thank you both! Installing AFNI was still giving me issues on WSL, so I’m going to try Stebo’s open source version. I appreciate both of your responses.

Hey @stebo85 I get the below error. Do you know of a solution? Thanks in advance.

The NeuroDesk docker solution looks good, and I just tried the guest demo version. It’s a bit laggy for me, but it’s still completely usable.

If you’re having problems with the Xwindows display, setting the wsl version to version 1 seems to help for some systems. MobaXterm, X410, Win32 are alternative X servers that work well too.

It looks like docker isn’t running? Can you check if you started docker, then try to run the docker command in Windows Powershell to exclude any issues with your wsl setup.

Thanks for the reply.

So, I don’t have this docker. Would I need to install Docker as explained here? Thanks.

Get started with Docker containers on WSL | Microsoft Docs

Yes, neurodesk requires docker, so you would need to install that :slight_smile:

Here are the complete instructions for running neurodesk in windows: Windows | NeuroDesk