[launchd-dev] Launchd sanitizing python environment

Heath Carlisle heath at brownbarn.com
Fri Jan 1 15:00:07 PST 2010


Solved, thanks. The (Leopard 10.5.8) solution was to add an "initialization"
script that runs via launchd at boot time to pass the needed values to the
(launchd) environment.  After that, all other scripts run via launchd are
aware of these variables.

-heath carlisle



Damien Sorresso wrote:
> 
> 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.
> 
> _______________________________________________
> launchd-dev mailing list
> launchd-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev
> 
> 

-- 
View this message in context: http://old.nabble.com/Launchd-sanitizing-python-environment-tp26799801p26989031.html
Sent from the Launchd mailing list archive at Nabble.com.



More information about the launchd-dev mailing list