I always read a lot about setting something in ~/.bash_profile or ~/.bashrc or ~/.profile and I never really understand all the technical differences or the files aren't there already and creating the files doesn't seem to make a difference and I'm just left confused.
The way to set environment variables for a user on a Mac as per Apple:
http://developer.apple.com/library/mac/#qa/qa1067/_index.html
AND THEN re-login! :)
To create the environment.plist file Open Xcode -> File -> New File -> Resource -> Property List. When saying where the file should be saved, navigate to the users home directory and create a new folder named ".MacOSX". Then save the file as environment.plist. Right click in the file to "Add Row". I have found that the environment variable being set gets appended (at least in the case of PATH). Save the file, quit, and then re-login to have the changes take effect. In terminal you can check the environment variables that are set by running the set command. Or if you want to check a specific variable instead of scrolling through the list, run echo $KEY (i.e. echo $PATH).
0 comments:
Post a Comment