open-discussion > RE: Welcome to Open-Discussion
Feb 23, 2011  10:02 PM | Joseph Mandeville
RE: Welcome to Open-Discussion
Hi Katelin,

On Linux, executables are invoked from the command line by referencing the name of the executable with an interpretable path. So, if jip-display is sitting on /home/katelin/jip-current/jip-display/Linux-x86_64, then you can run it by typing
/home/katelin/jip-current/jip-display/Linux-x86_64/jip-display   or   ~katelin/jip-current/jip-display/Linux-86_64/jip-display.

I set up executables to run through shell scripts, which provide a number of advantages:
1) aliases are defined so that you don't have to type as much,
2) If you switch from a 64-bit machine to a 32-bit machine, you don't have to change anything (the 32-bit executable will be used),
3) an environment variable is defined (JIP_HOME), which enables programs to find help files.

I strongly suggest doing this:

Let's say that you now have a directory named /home/katelin/jip-current:
1) If you are using the tcsh or csh Linux shell, then edit the file /home/katelin/jip-current/define-jip.tcsh
    If you are using the bash         Linux shell, then edit the file /home/katelin/jip-current/define-jip.bash
    In either case, use the editor to change the directory name corresponding to JIP_HOME to point to the directory /home/katelin/jip-current
2) To define jip executables, do this:
    source /home/katelin/jip-current/define-jip.tcsh
    This Linux script will tell you the names of aliases that have been defined.  For instance, xd points to the display package.
    If you have a NIFTI file "myfile.nii", then you can display it from Linux by typing "xd myfile.nii"
3) So that you don't have to "source" the script every time you login, put this into your .cshrc:
    source /home/katelin/jip-current/define-jip.tcsh 1
    The "1" at the end simply suppresses output, so that don't get messages from "define-jip.tcsh" every time you login.
    If you are using the bash shell, do exactly the same thing but replace "define-jip.tcsh" with "define-jip.bash"

That should do it.
If you other questions on this subject, please contact me directly (jbm@nmr.mgh.harvard.edu).

Best,
Joe

Threaded View

TitleAuthorDate
Christian Haselgrove Dec 11, 2009
Katelin Engerer Feb 23, 2011
RE: Welcome to Open-Discussion
Joseph Mandeville Feb 23, 2011