You need to use launchctl
to tell eg, Eclipse about these variables.
launchctl setenv TEST_LOGIN_DBKEY key-goes-here
You can automate this and extend it to all your bash environment variables by placing the following at the bottom of your ~./bashrc
:
set | sed 's/=/ /' | xargs launchctl setenv
The set
prints the list of defined variables, the sed
replaces equals signs in the set
output with spaces, as that's how launchctl
expects the variables. Finally, xargs
passed each variable to launchctl
's set env
command.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.