Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .