Set ENV variable at startup
2.4 MBP, Mac OS X (10.5.7)
2.4 MBP, Mac OS X (10.5.7)
setenv YOUR ENVVARIABLE /some/value
Apparently the file is not loaded until a GUI starts up. So it does not work on my server.
Camelot wrote:
Edit /etc/launchd.plist
(or create it if it doesn't exist) and add a line:
setenv YOUR ENVVARIABLE /some/value
This file is read by launchd when the system boots and any environment variables set there are available for all processes.
that should be /etc/launchd.conf not /etc/launchd.plist, I think.
A .plist file is always XML.
> Not so. /etc/launchd.conf should be loaded first at boot time.
Gnarlodious wrote:
> Not so. /etc/launchd.conf should be loaded first at boot time.
If that is true, the only explanation is that it must be a bug.
export YOURENVVARIABLE=some-value
Set ENV variable at startup