0

I know for GUI apps you need to set variables under /etc/launchd.conf. But I already have my env variables set in .bash_profile and I don't want to maintain 2 sets of env variables.

Is there a way to set environment variables for GUI applications from existing variables set in .bash_profile?

1

You can source .bash_profile using lanunchd services. .bash_profile is sourced when bash is run, and this happens when opening the Terminal or connecting via ssh.

It seems this thread is of significance: https://stackoverflow.com/questions/6442364/running-script-upon-login-mac

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.