Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

As I asked in here, I learned that the environment variable of PATH is different depending on how I launch the app.

Using 'aquamacs' from command line is run on top of bash, so the PATH variable is copied to the PATH variable in eshell.

But, how about the clicking the Aquamacs icon method? What PATH variable is set, when I click an app with Mac OS X? And how the PATH variable is set in that way?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

When you run something from the command line, it's created as a child process of the shell you're running within Terminal. As such, it inherits its environment from your shell.

Running by double-clicking, it's not launched by bash but as a child of launchd.

Open up Activity Monitor and choose "All Processes, Hierarchically" to show the parent/child process relationships.

alt text

Setting environment variables for programs not launched from the shell are discussed in other questions such as this one and this one.

share|improve this answer
    
Doug's first link is the important one. You can create an XML plist file at ~/.MacOSX/environment.plist to define what environment variables get inherited by GUI apps launched from Finder. –  Spiff Sep 2 '10 at 15:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.