Sponsor Products
Setting Environment Variables on OSX - Best Practices
posted by Mike Moss  on May 18, 2018, 1:25 p.m. (1 year, 2 days ago)
0 Responses     0 Plus One's     0 Comments  



Im curious what people are doing and what people consider best practices for setting env variables on OSX. Specifically, we are a mixed environment of PC's and OSX. The PC's we just go through GPO - nuff said.

In OSX, up until now we have been using a local login script (.command) file that sets env variables using the launchctl setenv command. We would like to change this to something a little more elegant that does not use the user's login items feature.


All our machines are OSX 10.12 and it seems launchd.conf is not supported in anything higher than 10.10 - that option is no go.

We also would prefer this to be module. When we were first looking at the idea of the .bash_profile, we wanted that to source two .sh scripts, one for our development team and another for IT. Each dept can make changes as necessary without disturbing the other. However, ive had isses with this set up due to the .bash_profile running everytime Terminal is launched - which is by design of the bash_profile.


So, what are some other ways? Im curious to hear what others have set up.





Thread Tags:
  osx, variables, env,environment