You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can tell, the trick is to get access to those variables when launching apps from Spotlight or the Dock, as .bash_profiles etc. are ran when you Terminal.app or iTerm.app etc.
I think @shen-tian is right: native Mac apps launched from the Dock or by double-clicking their icons do not get launched via a login or interactive shell, so none of the user shell startup scripts are run in that context. (In fact, I think it skips all shell startup files, so there's nothing you can do at the shell level to set environment variables.) Hackery like that linked SO posts is the way you have to do it.
I'm Submitting a ...
Tool/Language/etc
Setting environmental variables (especially ones that gets picked up in non-terminal launched apps) seems to be a bit of a challenge?
Best I can find seem to be the top answer of this SO post using
environment.plist
.Other Information
Happy to write this up, just want to check there isn't an obviously better way to do this.
The text was updated successfully, but these errors were encountered: