comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to set environment variables in IDLDE
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: How to set environment variables in IDLDE [message #74392] Tue, 11 January 2011 21:13
mankoff is currently offline  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 Go to previous message
penteado is currently offline  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 Go to previous message
mankoff is currently offline  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 Go to previous message
penteado is currently offline  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 Go to previous message
mankoff is currently offline  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 Go to previous message
Foldy Lajos is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDLdoc 3.3.1 bug fix release
Next Topic: FFT of gaussian

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:36:21 PDT 2025

Total time taken to generate the page: 0.00757 seconds