Re: How to set environment variables in IDLDE [message #74392] |
Tue, 11 January 2011 21:13 |
mankoff
Messages: 131 Registered: March 2004
|
Senior Member |
|
|
On Jan 11, 4:49 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Jan 11, 10:35 pm, mankoff <mank...@gmail.com> wrote:
>
>>> But it does work if you start idlde from the terminal, right? So it
>>> would not be an issue with the DE, it would be in the shortcut.
>
>> It does work when launched from the terminal. It isn't an IDL issue
>> per se, but an issue with the way Mac passes environment inheritance.
>
> Could it be that the variables were set in .profile after the current
> desktop session started running? In GNOME, I noticed that processes
> started from the menus are given a copy of the environment variables
> as they were when the GNOME process was started. Which can make things
> quite confusing, as a process may get variables that are not set in
> the current .profile and *rc files anymore.
I logged out/in and even rebooted after setting up environment
variables, and they are just not read from the UNIX dot files. This is
known behavior on OS X, and using ~/.MacOSX/environment.plist is a
known solution, although a buggy solution in this case. Adding/
adjusting the environment variable in the IDL startup file works fine.
-k.
|
|
|
Re: How to set environment variables in IDLDE [message #74393 is a reply to message #74392] |
Tue, 11 January 2011 16:49  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Jan 11, 10:35 pm, mankoff <mank...@gmail.com> wrote:
>> But it does work if you start idlde from the terminal, right? So it
>> would not be an issue with the DE, it would be in the shortcut.
>
> It does work when launched from the terminal. It isn't an IDL issue
> per se, but an issue with the way Mac passes environment inheritance.
Could it be that the variables were set in .profile after the current
desktop session started running? In GNOME, I noticed that processes
started from the menus are given a copy of the environment variables
as they were when the GNOME process was started. Which can make things
quite confusing, as a process may get variables that are not set in
the current .profile and *rc files anymore.
|
|
|
Re: How to set environment variables in IDLDE [message #74394 is a reply to message #74393] |
Tue, 11 January 2011 16:35  |
mankoff
Messages: 131 Registered: March 2004
|
Senior Member |
|
|
On Jan 11, 1:08 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Jan 11, 1:56 pm, mankoff <mank...@gmail.com> wrote:
>
>> Hi,
>
>> I usually run IDL from the command line and it inherits all the
>> environment variables I have in my .profile. This allows me to, for
>> example, "spawn, 'foo'" where foo is in my unix PATH, and foo is
>> found. When I run the IDLDE by double-clicking on the icon, this does
>> not work.
>
> But it does work if you start idlde from the terminal, right? So it
> would not be an issue with the DE, it would be in the shortcut.
It does work when launched from the terminal. It isn't an IDL issue
per se, but an issue with the way Mac passes environment inheritance.
-k.
|
|
|
Re: How to set environment variables in IDLDE [message #74395 is a reply to message #74394] |
Tue, 11 January 2011 13:08  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Jan 11, 1:56 pm, mankoff <mank...@gmail.com> wrote:
> Hi,
>
> I usually run IDL from the command line and it inherits all the
> environment variables I have in my .profile. This allows me to, for
> example, "spawn, 'foo'" where foo is in my unix PATH, and foo is
> found. When I run the IDLDE by double-clicking on the icon, this does
> not work.
But it does work if you start idlde from the terminal, right? So it
would not be an issue with the DE, it would be in the shortcut.
|
|
|
Re: How to set environment variables in IDLDE [message #74405 is a reply to message #74395] |
Tue, 11 January 2011 08:39  |
mankoff
Messages: 131 Registered: March 2004
|
Senior Member |
|
|
On Jan 11, 8:25 am, FÖLDY Lajos <fo...@rmki.kfki.hu> wrote:
> On Tue, 11 Jan 2011, mankoff wrote:
>> Is there a way in the IDLDE, or via IDL commands (I can put them in my
>> startup.pro file), for me to generally get my environment into the
>> IDLDE or specifically append my PATH statement so that some unix tools
>> can be found by SPAWN?
>
> IDL> setenv, 'PATH='+getenv('PATH')+':mydir'
>
> regards,
> Lajos
Yup that works thank you!
-k.
|
|
|
Re: How to set environment variables in IDLDE [message #74406 is a reply to message #74405] |
Tue, 11 January 2011 08:25  |
Foldy Lajos
Messages: 268 Registered: October 2001
|
Senior Member |
|
|
On Tue, 11 Jan 2011, mankoff wrote:
> Is there a way in the IDLDE, or via IDL commands (I can put them in my
> startup.pro file), for me to generally get my environment into the
> IDLDE or specifically append my PATH statement so that some unix tools
> can be found by SPAWN?
IDL> setenv, 'PATH='+getenv('PATH')+':mydir'
regards,
Lajos
|
|
|