Re: System Variable Behavior Changed in IDL 6.0 [message #38605 is a reply to message #38488] |
Fri, 12 March 2004 00:51   |
Pepijn Kenter
Messages: 31 Registered: April 2002
|
Member |
|
|
Marshall Perrin wrote:
> Michael Wallace <mwallace.removethismunge@swri.edu.invalid> wrote:
>
>>> Alternatively, one can just use environment variables:
>>
>> I knew there was an easier way!! Maybe trying to read the External
>> Development Guide today has made me thing that everything must be hard!
>>
>>
>>> -------
>>> setenv IDL_DIR /usr/local/rsi/idl_6.0
>>> #setenv IDL_DIR /usr/local/rsi/idl_5.6
>>>
>>> setenv LM_LICENSE_FILE $IDL_DIR/license/license.dat
>>> setenv IDL_PATH +$IDL_DIR/lib:+$HOME/idl
>>> -------
>>
>> Typically, the license directory is under $RSI_DIR, not $IDL_DIR.
>
>
> Ah, OK, that must be a peculiarity of my site's installation. We've got
> difference license servers running for the various different versions.
>
>
>> Also,
>> make sure that your $PATH is updated also so that the correct
>> executables are called.
>
>
> Here's where it gets really slick. If you examine
> /usr/local/rsi/idl_6.0/bin/idl, you'll see that it's actually a shell
> script that uses $IDL_DIR to find and then execute something like
> /usr/local/rsi/idl_6.0/bin/bin.solaris2.sparc/idl
>
> Thus _no matter which */bin/idl is in your $PATH, if $IDL_DIR is set
> it will find and run the correct binary_!
>
> I've got all of IDL 5.2 through 6.0 installed and this trick works
> to switch between all of them, with the $IDL_DIR environment variable
> as the only single thing that changes.
>
> - Marshall
My machine has the soft links pointing to the IDL directories and all
environment variables and aliases are using this softlink. This way all
paths are set correctly.
I realize now that my main problem with this solution was not the hassle
of creating a softlink every time I wanted to change versions, but that
I had to make sure the one or two other users on my machine are not
currently working in IDL (don't worry, I did). Setting the correct
environment variables in a script (or my .bashrc) will solve this
problem. Also the other users, who don't have the root password, can
then change versions if they like.
Thank you all for you input.
Best regards, Pepijn.
|
|
|