1

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?

1 Answer 1

1

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.

1
  • 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, 2010 at 15:32

You must log in to answer this question.

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