[launchd-dev] Launchd sanitizing python environment

Damien Sorresso dsorresso at apple.com
Sun Dec 20 19:22:01 PST 2009


On Dec 18, 2009, at 3:01 PM, Heath Carlisle wrote:
> Thanks, But - won't this still require me to set the environment variable one at a time? Can I not pass the entire user environment to launchd? I'm
> running the job as a User LaunchAgent, so I don't understand why this would not be the default behavior.


What you perceive as "the user environment" can come from a bunch of different places. If you're running it from a bash shell, the environment can come from .bash_profile and your terminal emulator. launchd isn't aware of either of those things.

On Snow Leopard, you can add the needed environment variables to ~/.MacOSX/environment.plist, and launchd will pick it up for Aqua session jobs.
-- 
Damien Sorresso
BSD Engineering
Apple Inc.



More information about the launchd-dev mailing list