-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting environmental variables #194
Comments
I'm not sure what you mean. Can't you just export them in your bash/zshrc/etc config? Like this: Could you give an example of such a environment variable? |
As far as I can tell, the trick is to get access to those variables when launching apps from Spotlight or the Dock, as Example:
The SO post I linked to seems to fix this. |
Sounds good to me if you want to write it 👍 Be sure to read our contribution docs. |
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: