This worked for “macOS High Sierra” version: 10.13.6 Create the file: my.startup.plist with the following contents: Modify the environment variables with yours. Then save. Run the command: launchctl load ~/Library/LaunchAgents/my.startup.plist Restart your GUI applications that require the environment variables.