problem with PATH defined in .profile and environment.plist

heapifyman heapifyman at gmail.com
Wed Jan 12 13:51:23 PST 2011


Am 12.01.2011 um 13:00 schrieb Tim Visher:

> Hi Phillip,

Hello,

>
> On Tue, Jan 11, 2011 at 5:47 PM, heapifyman wrote:
>> I had specified a few environment variables in my
>> ~/.MacOXS/environment.plist and also adapted my PATH variable there  
>> to
>> append my defined env variables.
>> This does somehow not work well with the "export PATH=..." that  
>> macports
>> adds to the ~/.profile file.
>>
>> I think I read somewhere that the environment.plist should be the  
>> place to
>> define these kinds of things on Mac OS X.
>> I know I can add the things that macporst adds to the PATH in my
>> environment.plist and comment out the "export PATH ..." in .profile  
>> but I
>> guess this will be added again once macports updates itself?
>>
>> Is there a way to make these two work together?
>
> I think you're going to need to be a little more specific as far as
> the exact problems you're seeing.  I also define my environment
> variables in `environment.plist` (to support an Emacs installation)
> and I haven't seen any issues as far as my PATH is concerned.
>
> You're only half right.  If programs other than Terminal.app (and apps
> started from there) need to see the environment variables you're
> setting, then you need to define them in  `environment.plist`.
> However, if Terminal.app is all that needs to see it, then you're
> perfectly fine setting it in your `.profile`.
>
> To preemptively answer the 'problem' you might be seeing, if you're
> noticing that your `PATH` contains duplicate entries because you've
> set them in `environment.plist` and in `~/.profile`, you've got
> nothing to worry about. I know it's not very DRY but `bash` happily
> lets you add duplicates to `PATH` and deals with it quite efficiently.
> If that's the problem you're noticing I suggest you stop worrying and
> learn to love them bomb.

sorry about this. I just found out that my problem was that I started  
the Terminal.app via Spotlight and then apparently does not pick up  
environment.plist (http://www.digitaledgesw.com/node/31), which is  
pretty lame.

So problem solved. Thank you.

Best regards,
Philip

>
> --
>
> In Christ,
>
> Timmy V.
>
> http://blog.twonegatives.com/
> http://five.sentenc.es/ -- Spend less time on mail

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Signierter Teil der Nachricht
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20110112/0e36d73a/attachment.bin>


More information about the macports-users mailing list