External Email - Use Caution        

I don’t think you told us what you installed for freesurfer in WSL.   The freesurfer installation should match the version of Ubuntu Linux that WSL installed.

You can check the Ubuntu OS version in the Ubuntu terminal window with,

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)”. <—- Ubuntu OS version = 20
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 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

With the above version info, you can use the debian package installer (.deb file), e.g., from https://surfer.nmr.mgh.harvard.edu/fswiki/rel7downloads, that matches your version of Ubuntu.  For Freesurfer 7.3.2 the choices are:

freesurfer_ubuntu18-7.3.2_amd64.deb
freesurfer_ubuntu20-7.3.2_amd64.deb
freesurfer_ubuntu22-7.3.2_amd64.deb

For the output above, you would choose freesurfer_ubuntu20-7.3.2_amd64.deb to match the version of Ubuntu Linux.

… cd in Ubuntu linux to where you downloaded or copied in the freesurfer_ubuntu20-7.3.2_amd64.deb file …
… and install it with ...
$ sudo apt install ./freesurfer_ubuntu20-7.3.2_amd64.deb

… and if the install succeeds then freesurfer would be installed under …
/usr/local/freesurfer/7.3.2

… and to remove the install above you would do …
$ sudo apt remove freesurfer

If you didn’t use the “apt install” command above to install freesurfer, then I would remove your current copy of the ./freesurfer tree, and do the “apt install”.  Then you could source the freesurfer setup script and try running freeview again.

Microsoft can change the WSL environment without notice when your Windows machine updates.  The version of Ubuntu linux installed in WSL depends upon when you set it up on your machine.  We try to troubleshoot issues users report back to us, but we can’t always remotely debug every interaction between WSL, different X servers (X-ming, Moba Xterm) and your machines graphics card.   We have written up some of workarounds at the bottom of this page, MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://surfer.nmr.mgh.harvard.edu/fswiki/FS7_wsl_ubuntu.   But some users are not able to get a 3rd party X-server running on Windows to work with every graphics application they run in WSL.   A simpler alternative is to use the VirtualBox VM as it has both freesurfer and an X-server pre-installed matching the OS provided in the VM.

- R.

On Oct 6, 2022, at 04:28, Justina Lee <justinalee56@gmail.com> wrote:

        External Email - Use Caution        


To whom this may concern and can help, 

I am currently trying to run Freeview under the Windows Subsystem Linux System. I can successfully download and open images, but nothing seems to be showing on my end (see image attached at the end). 

In order to find out what is preventing the X-server from correctly displaying graphics, I have tried to run the $ xeyes command and the eyes pop up, meaning that the X-windows server is working fine.

Upon checking the WSL Version, I am currently using the WSL version 2.

I have entered the two commands as follows:

echo "export XDG_RUNTIME_DIR=$HOME/.xdg" >> $HOME/.bashrc
echo "export DISPLAY=:0" >> $HOME/.bashrc
Then I exited Ubuntu, and tried to run freeview again (attempting to open a data file T1.mgz.) This still did not produce any image in freeview, although it opened it up. I tried changing the window, contrast, and brightness but to no avail. 

Is there another solution?

Terribly sorry and thank you so much for your time.

Sincerely,
Justina 
<Freeview image display.png>_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer