Inherit environment variable from launchd?

MacPorts’s “dbus” port defines launchd’s “SecureSocketWithKey” feature to create a temporary socket and assign it to an environment variable. This variable is inherited by all subprocess.


I’d like to create a similar environment variable (via launchd, inherited by all subprocesses) but with a static path. Is that possible?


I’ve looked at “EnvironmentVariables”, but that seems to be only variables for the daemon itself. I’ve looked at running “launchctl setenv” from a separate .plist file, but that doesn’t seem to be inherited by all of the session processes.


Thank you!

Posted on Jan 2, 2019 2:06 PM

Reply

There are no replies.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Inherit environment variable from launchd?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.