I am trying to install FreeSurfer on Ubutun. I follow an installation instruction online. When I walk through this step, I have a question:
Here is your FreeSurfer license. Place the four lines between theCUT HERE markers in a file named "license.txt" in the directory pointed toby the $FREESURFER_HOME environment variable (see the FreeSurfer documentation).
#---------------CUT HERE---------------
xxxxxx
xxxxx
xxxxx
xxxxx
#---------------CUT HERE---------------
Does that mean I have to paste the four lines into a file called "license.txt"? I actually did in this way. I paste the four lines at the end of a file called "license.txt". But when I finish all the steps and check the installation. There is an error popping up:
ERROR: FreeSurfer license file /home/urser/Downloads/freesurfer/license.txt not found.
But the license.txt is really in that fold called "freesurfer". Do I misunderstand the instruction?
Please follow the instructions:
Requirements
sudo apt-get install tcsh
Download and installation
cd ~
# this is the 64 bit version
wget ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.3.0/freesurfer-Linux-centos6_x86_64-stable-pub-v5.3.0.tar.gz
cd /usr/local/
sudo tar -xzvf ~/freesurfer-*.tar.gz
Setting the environment
echo "FREESURFER_HOME=/usr/local/freesurfer" >> ~/.bashrc
echo 'source $FREESURFER_HOME/SetUpFreeSurfer.sh' >> ~/.bashrc
Cleaning up -> this is optional
rm ~/freesurfer-*.tar.gz
Registering your software
Now register at https://surfer.nmr.mgh.harvard.edu/registration.html and paste the license code emailed to you here, PLEASE BE EXTRA CAREFUL WITH THIS STEP:
sudo gedit /usr/local/freesurfer/license.txt
I am not sure whether this next step is essential, but I usually run it.
sudo ln -s /usr/lib/libtiff.so.{4,3}
Conclusions
All in all, installing Freesurfer is not that hard, but installing it in a new linux system is surely a better option than messing with VirtualMachines in Windows. The VM that they offer in their website does not allow to run the commands in files residing in the host machine, which is the point of running a VM in the end.
Source
The current freesurfer 7.2 version has some semblance of a binary installer (.deb package) that worked for me on Ubuntu 18
(https://surfer.nmr.mgh.harvard.edu/fswiki/rel7downloads). On Windows, in lieu of running Ubuntu in a VirtualBox VM (which includes an X-server), you can use the windows subsystem for linux (WSL) to download and run the default Ubuntu image. Then try to download and run the freesurfer .deb binary installer in Ubuntu. With WSL 1 or 2 you can access the path to your windows home directory mounted in linux (https://surfer.nmr.mgh.harvard.edu/fswiki//FS7_wsl). You still need to setup an X server on Windows 10 to work with freeview running in Ubuntu under WSL, but I read that should no longer be necessary with WSL in Windows 11. Once you obtain a freesurfer license (https://surfer.nmr.mgh.harvard.edu/registration.html) then just set the environment variable FS_LICENSE to the absolute path for the license file, e.g., in your shell init file in Ubuntu (in order for freeview to run).
Related
I just installed Git SCM on my Windows machine. My machine had Node installed earlier. I am able to use node -v in git bash. But, Why I am able to use windows applications inside Git Bash and not in WSL Bash.
Inside WSL Bash-
hello#comp:~$ node -v
Command 'node' not found, but can be installed with:
sudo apt install nodejs
Inside Git Bash-
hello#comp MINGW64
$ node -v
v12.10.0
WSL is an a Linux like compatibility layer. You run Linux applications on top of WSL and they think they are running natively on Linux while the system calls are being translated to Windows OS system calls (WSL2 -- not yet released -- is a full Linux kernel running inside Windows). You do get to access Windows files through /mnt/c/... but that's about all you can expect in terms of Windows-Linux interoperability.
Git-bash, on the other hand, is a Windows app -- a shell running windows applications. Some of these may be compiled with a Linux compatibility library (Cygwin). But they don't have to be. This provides a less "Linux-like" experience but may be a good compromise if all you want are some Linux command line tools and don't need to install full-blown Linux executables.
Definition of PATH for both "environments" is different. Check that node's dir shows up on Git bash's and not in WSL Bash. Run this on both environments:
echo $PATH
I've recently installed anaconda3 in Ubuntu 17.10 (system environment). To run anaconda-navigator, I've to activate root for each time as
Source ~/anaconda3/bin/activate root
And to run it I've to write each time
anaconda-navigator
Now I am wanted to create a desktop entry but I'm having errors at multiple stages. Can you please explain from beginning how to create a desktop-entry for anaconda3 on Linux?
EDIT: I've tried using this post on AskUbuntu. But, it failed for me. It is not showing on dock-bar as well as in /usr/share/applications. I'm really frustrated.
First, check if anaconda3 is installed on your system or not (Sometime the package may be broken due to network issues during installation (Not worked for me)). And whether you are able to launch anaconda-navigator without a desktop entry.
For creating a desktop entry
Step 1. Open your text editor and save the following content as Anaconda.desktop to your home directory.
[Desktop Entry]
Version=1.0
Type=Application
Name=Anaconda-Navigator
GenericName=Anaconda
Comment=Scientific Python Development Environment - Python3
Exec='$HOME/anaconda3/bin/anaconda-navigator'
Categories=Development;Science;IDE;Qt;Education;
Icon=$HOME/anaconda3/lib/python3.8/site-packages/anaconda_navigator/static/images/anaconda-icon-256x256.png
Terminal=false
StartupNotify=true
MimeType=text/x-python;
Take care with the Python version. in $HOME/anaconda3/lib/python3.8/site-packages/anaconda_navigator/static/images/anaconda-icon-256x256.png change python3.8 if needed
Step 2. Copy your Anaconda.desktop to /usr/share/applications/ as root (Because you might need permission to copy at /usr/share/applications/)
sudo cp Anaconda.desktop /usr/share/applications
This will create a desktop entry named Anaconda in /usr/share/applications/.
Step 3. add this line export PATH="$HOME/anaconda3/bin:$PATH" to your /etc/profile or $HOME/.bashrc
Step 4. Check if Anaconda is added to your application dock. If you didn't find it, search it in search-bar. Or you can run directly from /usr/share/applications/Anaconda.desktop.
I am attempting to learn a bit about the command line and am following a free online course. I have been instructed to install a number of programs on my computer including VirtualBox, Vagrant and Git which I have done. There was a VagrantFile which I have also downloaded.
The problem I have is that Git Bash is not responding to any vagrant command. I am not familiar enough with the command line to test other programs or commands out but I have checked the Python version for example and got a response.
So when I attempt to run any vagrant command the interface returns the same location and then freezes. I can click and highlight within the window but it will not take any keyboard input. This happens regardless of whether I navigate to the vagrantfile folder or not.
Really confused! I have uninstalled and re-installed all the programs.
Currently operating:
Windows 10
Vagrant 1.9.7
Oracle VM VitualBox 5.1.26
Git 2.14.0
... MINGW64 ~
$ cd Desktop/Shell
... MINGW64 ~/Desktop/Shell
$ vagrant up
... MINGW64 ~/Desktop/Shell
$
// At this point the interface freezes and won't accept
// any input. It is the same if I call
// vagrant init
// vagrant --version
// vagrant halt --force
Any help would be hugely appreciated.
Thanks Chris.
I am interested in Rethinkdb and would like to develop/test on it, but main problem is: it don't have package for windows operating system. I tried to compile from source code, that was also not possible as there was no any instruction.
What makes it so difficult to make executable for windows? Is there any alternative way to install Rethinkdb in windows OS? even very small and not that famous application has windows binary but not Rethinkdb. It is quite surprise for me. Another surprising is there are many community executable for other OS but not windows.
Thank you for understanding and waiting for good answer.
Rethinkdb just announced that it started development for Windows. Please follow
[1] https://github.com/rethinkdb/rethinkdb/issues/1100
[2] https://twitter.com/segphault/status/590633792781611009
Update:
RethinkDB announced in Windows :
[3] https://rethinkdb.com/docs/install/windows/
Cross-platform development isn't that easy. RethinkDB uses some features under the covers which makes porting it to Windows a difficult job, f.e. a Unix toolchain for the builds and Unix syscalls. For more information on that have a look at this GitHub issue. It states that Windows support is planned, but with low priority.
As a quick fix, you could RethinkDB run in a virtual machine or in Microsoft Azure. For the second one, I wrote a blog post a few weeks ago.
RethinkDB has already started development for Windows. While it's not released yet, this is how you can run it through Vagrant. See: https://github.com/gearz-lab/rethinkdb-vagrant
I'm using Chocolatey, feel free to skip steps if they don't apply.
Installing Chocolatey
Open Powershell as an administrator and run this command:
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
... now you should have Chocolatey installed. We're gonna use to install the others.
Installing Vagrant
Run this as an administrator:
choco install vagrant -y
Installing VirtualBox
Vagrant relies on a virtualization application that it calls a "provider". The default one is VirtualBox so let's install it. Run cmd as administrator and run this:
choco install virtualbox -y
Now you should be able to run the vboxmanage command. If it doesn't work, make sure C:\Program Files\Oracle\VirtualBox is in your PATH.
Installing Cygwin
We're gonna log on a virtual machine using SSH, so we need a SSH enabled terminal. For that, let's use Cygwin.
choco install cyg-get -y
Installing Cygwin packages
There'are two Cygwin packages we need to install, openssh, because Cygwin doesn't have SSH support by default, and rsync so Vagrant can use it to synchronize files between the host and the guest machines.
On PowerShell, running as an administrator, let's run these commands:
cyg-get openssh
cyg-get rsync
Cloning rethinkdb-vagrant
Open the Cygwin64 Terminal. You should now be in your Cygwin home folder, which should look like C:\tools\cygwin\home\[YOUR_USER].
Make sure you have git installed. If you don't just choco install git -y. Now, clone rethyinkdb-vagrant:
git clone https://github.com/gearz-lab/rethinkdb-vagrant.git
Now you should have a directory like this: C:\tools\cygwin\home\[YOUR_USER]\rethinkdb-vagrant.
Starting Vagrant and useful commands
From inside the Cygwin64 Terminal home directory (described in the last step), type cd rethinkdb-vagrant, now, any Vagrant commands will target cd rethinkdb-vagrant.
To setup and boot the machine: vagrant up (After this, RethinkDB is available, see next step).
To access the machine's terminal: vagrant ssh.
To destroy the machine (every RethinkDB data will be lost): vagrant destroy.
To suspend the machine: vagrant suspend.
To resume a suspended machine: vagrant resume.
Accessing RethinkDB.
Make sure you have vagrant up from the last step. Now:
For accessing the web administration tool: http://localhost:8080.
For accessing RethinkDB from a client app, the port is 28015.
I had run the MacPorts installer (2.0.3) for my OS X Leopard (10.5.8) which finished "successfully". Unfortunately the port command was not available so I looked in the MacPorts Guide which says that the installer should have run a so-called "postflight" script that sets the necessary environment variables. I tried to run the postflight script manually (which I downloaded from here), but the execution fails with the following output:
Detected the bash shell.
Your shell already has the right PATH environment variable for use with
MacPorts!
Your shell already has the right MANPATH environment variable for use with
MacPorts!
Your shell already has the right DISPLAY environment variable for use with
MacPorts!
Adding [default] tag to sources.conf if needed...
couldn't read file "/Contents/Resources/upgrade_sources_conf_default.tcl": no
such file or directory
Updating port image format...
couldn't read file "/Contents/Resources/images_to_archives.tcl": no such file or
directory
Synchronizing the MacPorts installation with the project's rsync server...
-bash: __PREFIX__/bin/port: No such file or directory
An attempt to synchronize your recent MacPorts installation with the project's
rsync server failed!
Please run 'sudo port -d selfupdate' manually to find out the cause of the
error.
You have succesfully installed the MacPorts system, launch a terminal and try it
out!
Read the port(1) manual page and http://guide.macports.org for help,
http://www.macports.org/contact.php if you need to get in touch with The
MacPorts Project.
Any ideas?
First invoke the port command directly:
$ /opt/local/bin/port help
If that comes back with something reasonable (like the help text) then it's just that your $PATH isn't being used by your current shell. Try logging off and back on again to resolve that in the short term (this will test that your .bashrc file is correctly configured) or you could just modify the PATH environment variable directly (which doesn't test .bashrc):
$ export PATH=$PATH:/opt/local/bin
You downloaded the postflight script but it alone cannot access the accessory scripts in Contents/ because those are located into the install package.
Those missing Tcl scripts are for upgrading from an older install, the log says PATH was already correctly configured but the macports bin directory could have the wrong position in PATH variables, for instance being at the end of PATH.
If you are doing a fresh install you can just only need PATH and MANPATH -you want man pages provided by macports before system's ones- as per [1]
[1] http://guide.macports.org/#installing.shell.postflight