Hi Darko, try commenting out the last two lines and rerunning freeview (it’s possible that the error message getting inserted into your PATH is the source of these issues): # export PATH="$HOME/.linuxbrew/bin:$PATH" # export PATH="$(brew --prefix)/bin:$PATH"
From: Darko Komnenić <komnen...@gmail.com> Date: Thursday, April 19, 2018 at 6:54 AM To: "Hoopes, Andrew" <ahoo...@mgh.harvard.edu> Cc: FS Help <freesurfer@nmr.mgh.harvard.edu> Subject: Re: [Freesurfer] unable to open freeview An update, in the .bash_profile file, there is a line about linuxbrew. Do you recommend that I remove it? Sending the file attached. Best, Darko On Thu, Apr 19, 2018 at 11:59 AM, Darko Komnenić <komnen...@gmail.com<mailto:komnen...@gmail.com>> wrote: Hi Andrew, sorry for the delay. Attached is the hidden bashrc file from my Home folder. It doesn't seem to specify anything about linuxbrew, so I don't know why this error is showing up. Thanks a lot for any suggestions! Best, Darko On Tue, Apr 17, 2018 at 11:07 PM, Hoopes, Andrew <ahoo...@mgh.harvard.edu<mailto:ahoo...@mgh.harvard.edu>> wrote: Are you using a bash shell? If you are, there should be a file located at ~/.bashrc (it’s a hidden file in your home folder) Andrew From: Darko Komnenić <komnen...@gmail.com<mailto:komnen...@gmail.com>> Date: Tuesday, April 17, 2018 at 2:24 PM To: "Hoopes, Andrew" <ahoo...@mgh.harvard.edu<mailto:ahoo...@mgh.harvard.edu>> Cc: FS Help <freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu>> Subject: Re: [Freesurfer] unable to open freeview Hi Andrew, thanks a lot for your feedback! I renamed the original fine, so it is now called just tcl_setup, and here is the output I got after typing "freeview" /home/lisak/miniconda3/bin:/home/lisak/Desktop/freesurfer/bin:/home/lisak/Desktop/freesurfer/fsfast/bin:/home/lisak/Desktop/freesurfer/tktools:/home/lisak/Desktop/fsl/bin:/home/lisak/Desktop/freesurfer/mni/bin:/home/lisak/Desktop/fsl/bin:E: Linuxbrew directory detected, but it seems to be broken. Try to remove '/home/lisak/.linuxbrew' and try again./bin:/home/lisak/Desktop/fsl/bin:/home/lisak/bin:/home/lisak/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin Unmatched ". So this looks pretty much like the error I got when using Human Connectome Project pipelines (to answer your earlier question, the only time I got this error before was while running FreeSurferPipelineBatch.sh in HCP pipelines, specifically after the start of FreeSurferHighResWhite script). I don't use FreeSurfer for anything else on this computer, since this is the special 5.3-HCP version, and I use FS6 on a different computer. Also, the Unmatched quote error does not appear when running FSL or other programs. (Not sure if you're familiar with HCP pipelines, but they are used (among other things) to estimate cortical myelin content, and have 3 main preprocessing pipelines, PreeFS one, FS one, and PostFS one - I got the Unmatched ". error in the FS one. When writing to their mailing list, I was told that it seems like an error unique to my computer, and they have not encountered it before.) Anyway, the Linuxbrew error appears again now after trying to start freeview. I searched for bashrc on my computer and I got two locations, one in perl subfolder, and one in miniconda3 subfolder. The latter just has 2 lines, so it's probably not the one you meant. The former is quite a long file, but does not mention linuxbrew at any point. I am sending the file attached. I would be really very grateful if you would try helping out with this. I have been googling this error, but was not able to find anything. Thanks a bunch! Darko On Tue, Apr 17, 2018 at 7:52 PM, Hoopes, Andrew <ahoo...@mgh.harvard.edu<mailto:ahoo...@mgh.harvard.edu>> wrote: Hi Darko, there’s a big difference between using single vs double quotes in shell scripting – single quotes prevent variable expansion. Your modification to tcl_setup actually renders your PATH completely unusable. The quote syntax in the setup scripts shouldn’t cause any problems, and your unmatched errors indicate a more low-level issue that should probably get fixed directly. Are you only getting these unmatched errors with freesurfer tools? I can try to help you solve this, but I’m not quite sure I understand the initial problem. PS: At some point in your .bashrc is linuxbrew called? You don’t want that “Linuxbrew directory detected…” error in your PATH variable From: Darko Komnenić <komnen...@gmail.com<mailto:komnen...@gmail.com>> Date: Tuesday, April 17, 2018 at 1:21 PM To: "Hoopes, Andrew" <ahoo...@mgh.harvard.edu<mailto:ahoo...@mgh.harvard.edu>> Cc: FS Help <freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu>> Subject: Re: [Freesurfer] unable to open freeview Hi Andrew, OK, so here is what happened: After adding the echo $PATH under the first line, my output is now this: "/home/lisak/miniconda3/bin:/home/lisak/Desktop/freesurfer/bin:/home/lisak/Desktop/freesurfer/fsfast/bin:/home/lisak/Desktop/freesurfer/tktools:/home/lisak/Desktop/fsl/bin:/home/lisak/Desktop/freesurfer/mni/bin:/home/lisak/Desktop/fsl/bin:E: Linuxbrew directory detected, but it seems to be broken. Try to remove '/home/lisak/.linuxbrew' and try again./bin:/home/lisak/Desktop/fsl/bin:/home/lisak/bin:/home/lisak/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin /home/lisak/Desktop/freesurfer/lib/qt/bin:/home/lisak/Desktop/freesurfer/lib/vtk/bin:$FS_TCL_HOME/bin:$PATH freeview.bin: Command not found." Also sending attached the tcf_setup files. I guess now I know a bit more about what happened. I was running the Human Connectome Project pipelines, and had an error that included an unmatched quote. It turned out that, for some reason, my computer had an issue with single quotes in some setup files, including a tcf_setup file. For that reason, we changed the single to double quotes and that error went away. (If you're interested in more details, one of the commands performed in the FreeSurferPipeline was the tkregister2 command. After trying to run this command in isolation (having previously defined $mridir variable in the terminal), we finally got the same Unmatched ". error that we got initially, by running the entire pipeline. Playing with double and single quotes in that line did not do anything, and it seemed that the error arises instantaneously, without FreeSurfer having the time to even try anything. so we opened the tkregister2 file in desktop/freesurfer/bin folder. This file seemed to refer to a tcl_setup file within the same subfolder. So, we opened that one, and replaced all double quotes with single quotes, in accordance with this forum post: https://stackoverflow.com/questions/10761838/getting-unmatched-on-a-simple-csh-ssh-script Even though csh is not my default shell, I think it is still being used by some processes. (Not sure if that makes any sense, I am a beginner when it comes to using Linux.) Running the tkregister2 command then in the terminal did not return Unmatched ". error, and the Pipeline was able to be completed.) The tcf_setup file in the attachment is the file we edited, whereas the tcl_setup_backup is the original file. Would you then recommend renaming the old file to tcl_setup? That would mean then renaming them back and forth, depending on the step we are doing in the analysis, but I guess it's doable. Best, Darko On Tue, Apr 17, 2018 at 6:57 PM, Hoopes, Andrew <ahoo...@mgh.harvard.edu<mailto:ahoo...@mgh.harvard.edu>> wrote: Hi Darko, the freeview wrapper script sets up libraries used by freeview.bin, so the error you get when only calling freeview.bin is expected. There is something odd going on with your PATH after sourcing the TCL package. Can you send me your tcl_setup file in $FREESURFER_HOME/bin? It would also be helpful if you add another “echo $PATH” line right below the “#!/bin/tcsh -ef” in the freeview script best Andrew From: Darko Komnenić <komnen...@gmail.com<mailto:komnen...@gmail.com>> Date: Tuesday, April 17, 2018 at 12:36 PM To: "Hoopes, Andrew" <ahoo...@mgh.harvard.edu<mailto:ahoo...@mgh.harvard.edu>> Cc: FS Help <freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu>> Subject: Re: [Freesurfer] unable to open freeview Hi Andrew, thanks for getting back so quickly. Here are the outputs: “tcsh --version” gives a "tcsh 6.18.01 (Astron) 2012-02-14 (x86_64-unknown-linux) options wide,nls,dl,al,kan,rh,nd,color,filec" I added echo $PATH right before the “freeview.bin $argv” line in the freeview script, and the output to "freeview" is now: "/home/lisak/Desktop/freesurfer/lib/qt/bin:/home/lisak/Desktop/freesurfer/lib/vtk/bin:$FS_TCL_HOME/bin:$PATH freeview.bin: Command not found." So it seems it has something to do with libraries. If I type freeview.bin instead of just freeview, I get: "freeview.bin: error while loading shared libraries: libvtkverdict.so.5.6: cannot open shared object file: No such file or directory" There seems to be a similar entry in the mailing list already, but from what I see, it hasn't been solved. This is the link to the old question: https://mail.nmr.mgh.harvard.edu/pipermail//freesurfer/2017-September/053992.html<https://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/2017-September/053992.html> Unlike the original poster, i don't get the "Abort" feedback, though. Thanks a lot! Best, Darko On Tue, Apr 17, 2018 at 6:26 PM, Hoopes, Andrew <ahoo...@mgh.harvard.edu<mailto:ahoo...@mgh.harvard.edu>> wrote: Do you have tcsh properly installed? You can check by running the command “tcsh --version”. If it is installed, I’m not quite sure why you’re experiencing this problem, but I would suggest modifying the freeview script at /home/lisak/Desktop/freesurfer/bin/freeview to debug. Try adding the following line right before the call to “freeview.bin $argv”: echo $PATH and send the output over. best Andrew From: Darko Komnenić <komnen...@gmail.com<mailto:komnen...@gmail.com>> Date: Tuesday, April 17, 2018 at 11:35 AM To: "Hoopes, Andrew" <ahoo...@mgh.harvard.edu<mailto:ahoo...@mgh.harvard.edu>> Cc: FS Help <freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu>> Subject: Re: [Freesurfer] unable to open freeview Hi Andrew, FreeSurfer is being sourced automatically each time I open the terminal, and I see the usual lines: Setting up environment for FreeSurfer/FS-FAST (and FSL) FREESURFER_HOME /home/lisak/Desktop/freesurfer FSFAST_HOME /home/lisak/Desktop/freesurfer/fsfast FSF_OUTPUT_FORMAT nii.gz SUBJECTS_DIR /home/lisak/Desktop/freesurfer/subjects MNI_DIR /home/lisak/Desktop/freesurfer/mni FSL_DIR /home/lisak/Desktop/fsl The outputs of which freeview and which freeview.bin are, respectively: # 1. /home/lisak/Desktop/freesurfer/bin/freeview 2. /home/lisak/Desktop/freesurfer/bin/freeview.bin These are actual locations of the file, so all seems good until that point. I typed "freeview" again, after doing the "which freeview" commands, and I got the "freeview.bin: Command not found." again. Any further suggestions are appreciated! Thanks in advance, Darko On Tue, Apr 17, 2018 at 5:28 PM, Hoopes, Andrew <ahoo...@mgh.harvard.edu<mailto:ahoo...@mgh.harvard.edu>> wrote: Hi Darko, how are you sourcing freesurfer? And what is the output of running “which freeview” and “which freeview.bin”? best, Andrew From: <freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>> on behalf of Darko Komnenić <komnen...@gmail.com<mailto:komnen...@gmail.com>> Reply-To: FS Help <freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu>> Date: Tuesday, April 17, 2018 at 11:17 AM To: FS Help <freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu>> Subject: [Freesurfer] unable to open freeview Dear experts, I encountered a problem when trying to open freeview. I am using FreeSurfer v.5.3.0-HCP, and after sourcing it, I tried typing simply freeview in the terminal, as described in this link: http://freesurfer.net/fswiki/FreeviewGuide/FreeviewGeneralUsage/FreeviewQuickStart but the feedback I get is: freeview.bin: Command not found. Am I missing something? When searching for freeview on my computer, "freesurfer" and "freesurfer.bin" appear in my bin subfolder, but for some reason they seem not to be recognized. Any help is appreciated! Best, Darko The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.