Hi Joana,
There are a few things going on here.
First, you should create a subjects directory for FreeSurfer recons and tell FreeSurfer where it is by setting the SUBJECTS_DIR environment variable. You should be able to do that with these 2 commands:
```
mkdir -p /home/developer/guest_shared/fs-subjects
export SUBJECTS_DIR=/home/developer/guest_shared/fs-subjects
```
Next, it looks like you've downloaded the dataset to a folder called `/home/developer/guest_shared/mv ds000174-1.0.1 Cannabis/` and the spaces in the folder name are confusing recon-all. Can you rename that directory and remove the spaces? You should
be able to do that in the file explorer, but this should also work:
```
mv '/home/developer/guest_shared/mv ds000174-1.0.1 Cannabis/' /home/developer/guest_shared/mv-ds000174-1.0.1-Cannabis/
```
You should then be able to run the recon-all command. However, when running recon-all, you might want to rename the subject from 'sub101' to 'sub101-sesBL' (recon-all -s sub101-sesBL) so that you don't confuse it with the follow-up session (ses-FU) in
the dataset.
-Paul
External Email - Use Caution
Hi FreeSurfer Team,
I am trying to run Recon-all on the cannabis test data on the freesurfer tutorial (I am running Ubuntu 18 VM on Windows os).
When I try to use the Recon-all command, I get the error "Command exited with non-zero status" and "recon-all -s sub101 exited with ERRORS." Can you help me solve this?
I am completely new to coding/Ubuntu so I am also confused about the SUBJECTS_DIR. Where can I find that folder? I do not see /usr/local/freesurfer/7.2.0/subjects anywhere in the VM.
Also, if there is a better way to export and present my code to you other than copy-pasting it as I have done below, please let me know so I can do that with future emails.
developer@developer-VirtualBox:~/guest_shared/mv ds000174-1.0.1 Cannabis/sub-101/ses-BL/anat$ recon-all -s sub101 -i sub-101_ses-BL_T1w.nii.gz -all
Subject Stamp: freesurfer-linux-ubuntu18_x86_64-7.2.0-20210721-aa8f76b
Current Stamp: freesurfer-linux-ubuntu18_x86_64-7.2.0-20210721-aa8f76b
INFO: SUBJECTS_DIR is /usr/local/freesurfer/7.2.0/subjects
Actual FREESURFER_HOME /usr/local/freesurfer/7.2.0
Linux developer-VirtualBox 5.4.0-109-generic #123~18.04.1-Ubuntu SMP Fri Apr 8 09:48:52 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
/usr/local/freesurfer/7.2.0/subjects/sub101
mri_convert /home/developer/guest_shared/mv ds000174-1.0.1 Cannabis/sub-101/ses-BL/anat/sub-101_ses-BL_T1w.nii.gz /usr/local/freesurfer/7.2.0/subjects/sub101/mri/orig/001.mgz
mri_convert /home/developer/guest_shared/mv ds000174-1.0.1 Cannabis/sub-101/ses-BL/anat/sub-101_ses-BL_T1w.nii.gz /usr/local/freesurfer/7.2.0/subjects/sub101/mri/orig/001.mgz
mri_convert: extra arguments ("Cannabis/sub-101/ses-BL/anat/sub-101_ses-BL_T1w.nii.gz" and following)
type mri_convert -u for usage
Command exited with non-zero status 1
@#@FSTIME 2022:05:05:15:24:40 mri_convert N 4 e 0.00 S 0.00 U 0.00 P 100% M 6204 F 0 R 242 W 0 c 0 w 1 I 0 O 0 L 0.19 0.11 0.04
@#@FSLOADPOST 2022:05:05:15:24:40 mri_convert N 4 0.19 0.11 0.04
Linux developer-VirtualBox 5.4.0-109-generic #123~18.04.1-Ubuntu SMP Fri Apr 8 09:48:52 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
recon-all -s sub101 exited with ERRORS at Thu May 5 15:24:40 EDT 2022
For more details, see the log file /usr/local/freesurfer/7.2.0/subjects/sub101/scripts/recon-all.log
To report a problem, see http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
Thank you!
Joanna