Post

Replies

Boosts

Views

Created

How to set permanent environment variables?
I am looking to set environment variables for the use of some applications that are launched by icon or from the dock. I am aware of launchctl setenv for setting environment variables, but I am also aware that the effects of that last only until the next reboot. I find various people posting hacks that come down to configuring some .zsh* initialization files, but those fines are not used until an interactive login session is started, and so are not of value for the case where the user does not happen to launch terminal The particular environment variable of interest at the moment is JAVA_HOME for use by MATLAB . MATLAB is started by the shell script /Applications/MATLAB_R20xxx.app/bin/matlab and does not appear to have a .plist file associated with it . Editing the shell script would not be ideal.
1
0
39
Apr ’25