Which "PATH" did IDL use??? [message #91550] |
Wed, 29 July 2015 02:33  |
deepeyes.ym
Messages: 4 Registered: July 2015
|
Junior Member |
|
|
I'm really confused about all the parameters inside of IDL.
I have called "spawn" by using
IDL> spawn, 'gv m4_r_600_test_flag0_individual_outliers.eps'
bash: gv: command not found
Then,
IDL> PRINT,GETENV("PATH")
/Applications/itt/idl71//bin:/usr/bin:/bin:/usr/sbin:/sbin
BUT, I don't know where this "PATH" comes from!!!!
It's different from the "!PATH" inside of IDL, different from the "$PATH" in the .bash_profile, so where IDL get this parameter and how could I change this one????
any comments will be appreciated!
|
|
|
|
Re: Which "PATH" did IDL use??? [message #91561 is a reply to message #91550] |
Wed, 29 July 2015 13:49   |
Doug Edmundson
Messages: 58 Registered: November 2005
|
Member |
|
|
On 7/29/15 3:33 AM, deepeyes.ym@gmail.com wrote:
> I'm really confused about all the parameters inside of IDL.
> I have called "spawn" by using
>
> IDL> spawn, 'gv m4_r_600_test_flag0_individual_outliers.eps'
> bash: gv: command not found
>
> Then,
>
> IDL> PRINT,GETENV("PATH")
> /Applications/itt/idl71//bin:/usr/bin:/bin:/usr/sbin:/sbin
>
> BUT, I don't know where this "PATH" comes from!!!!
>
> It's different from the "!PATH" inside of IDL, different from the "$PATH"
in the .bash_profile, so where IDL get this parameter and how could I change
this one????
>
> any comments will be appreciated!
>
Hi deepeyes,
I'll guess that in your case it's using .bashrc to set the environment.
It will not be using IDL's environment since a new "bash" shell is
being created. So, try updating PATH in .bashrc.
Cheers,
Doug
|
|
|
|
Re: Which "PATH" did IDL use??? [message #91569 is a reply to message #91561] |
Thu, 30 July 2015 02:09   |
deepeyes.ym
Messages: 4 Registered: July 2015
|
Junior Member |
|
|
On Wednesday, July 29, 2015 at 11:49:56 PM UTC+3, Doug Edmundson wrote:
> On 7/29/15 3:33 AM, wrote:
>> I'm really confused about all the parameters inside of IDL.
>> I have called "spawn" by using
>>
>> IDL> spawn, 'gv m4_r_600_test_flag0_individual_outliers.eps'
>> bash: gv: command not found
>>
>> Then,
>>
>> IDL> PRINT,GETENV("PATH")
>> /Applications/itt/idl71//bin:/usr/bin:/bin:/usr/sbin:/sbin
>>
>> BUT, I don't know where this "PATH" comes from!!!!
>>
>> It's different from the "!PATH" inside of IDL, different from the "$PATH"
> in the .bash_profile, so where IDL get this parameter and how could I change
> this one????
>>
>> any comments will be appreciated!
>>
>
> Hi deepeyes,
>
> I'll guess that in your case it's using .bashrc to set the environment.
> It will not be using IDL's environment since a new "bash" shell is
> being created. So, try updating PATH in .bashrc.
>
> Cheers,
> Doug
Actually, I'm using IDLDE, that's why the .bash_profile not working (I have already defined the PATH in .bash_profile)
|
|
|
Re: Which "PATH" did IDL use??? [message #91576 is a reply to message #91568] |
Thu, 30 July 2015 09:46   |
Heinz Stege
Messages: 189 Registered: January 2003
|
Senior Member |
|
|
On Thu, 30 Jul 2015 02:07:01 -0700 (PDT), deepeyes.ym@gmail.com wrote:
> On Wednesday, July 29, 2015 at 1:02:58 PM UTC+3, Heinz Stege wrote:
>> Please look for
>> CD [, Directory] [, CURRENT=variable]
>> in the IDL Help.
>>
>> Cheers, Heinz
>
> Sorry, I don't get the point..
Well, seems like I didn't get your question too. I read your original
message two more times to get an idea. I'm not very familar with
Unix/Linux, so probably I will not be able to help. But I will try:
The IDL command
spawn, 'gv m4_r_600_test_flag0_individual_outliers.eps'
obviously failed, because the bash shell does not find the command
"gv". IDL does not know in which folder gv resides. IDL simply sends
the spawn command to the shell. If you know the path of the file gv,
add it to the spawn command:
spawn, 'path/gv m4_r_600_test_flag0_individual_outliers.eps'
and everything should be fine.
If there is any reason, not to specify the path, you can try xdg-open.
It may or may not work:
spawn,['xdg-open','m4_r_600_test_flag0_individual_outliers.e ps'],/noshell
This worked for me in case of an .ods file, when I exported an IDL
program from Windows to Linux.
Cheers, Heinz
|
|
|
|
Re: Which "PATH" did IDL use??? [message #91578 is a reply to message #91550] |
Thu, 30 July 2015 12:24  |
deepeyes.ym
Messages: 4 Registered: July 2015
|
Junior Member |
|
|
On Wednesday, July 29, 2015 at 12:33:32 PM UTC+3, deepe...@gmail.com wrote:
> I'm really confused about all the parameters inside of IDL.
> I have called "spawn" by using
>
> IDL> spawn, 'gv m4_r_600_test_flag0_individual_outliers.eps'
> bash: gv: command not found
>
> Then,
>
> IDL> PRINT,GETENV("PATH")
> /Applications/itt/idl71//bin:/usr/bin:/bin:/usr/sbin:/sbin
>
> BUT, I don't know where this "PATH" comes from!!!!
>
> It's different from the "!PATH" inside of IDL, different from the "$PATH" in the .bash_profile, so where IDL get this parameter and how could I change this one????
>
> any comments will be appreciated!
Dear all,
thank you very much for all your help. With suggestion from Doug, I finally be able to solve this problem. First of all, I'm sorry that I forget to mention I'm using Mac OSX 10.11 public beta 3 and IDL v7.1.1. This problem not appears in 10.10.4. So, may be Apple changes something. The solution is that just COPY .bash_profile to .bashrc, since OSX don't have the .bashrc in the first place (also I have already set the $PATH in .bash_profile, that's why it is ok when using idl in terminal). It's seems that IDLDE v7 only recognizes the .bashrc.
|
|
|