0

Because it was such a mission to get this simple bit of info I've decided to post it for others:

  1. In terminal execute: mkdir ~/.MacOSX
  2. In terminal execute: touch ~/.MacOSX/environment.plist
  3. Browse to the file and open.
  4. Paste:

        <key>DISPLAY</key>
    
        <string>:0.0</string>
    
        <key>PYTHONPATH</key>
    
        <string>/full/path/ofyour/favorite/script/dir:/full/path/of/another/script/dir:
    

  5. Edit to what you need and save.

1
  • It's confusing to put the resolution inside the question text. Instead, follow up with an answer. That's why I edited it out in the first place. Commented Jan 24, 2011 at 19:39

2 Answers 2

2

Here is the documented way to do it with Property List Editor.

Note that you should use caution when setting environment variables this way as they apply to launched GUI applications which might not be expecting them. For setting default environment variables when working in a terminal shell, the conventional UNIX way of using shell profile commands, like .profile or .bash_profile is preferred and less likely to break things.

Sign up to request clarification or add additional context in comments.

Comments

1
  1. In terminal execute: mkdir ~/.MacOSX
  2. In terminal execute: touch ~/.MacOSX/environment.plist
  3. Browse to the file and open.
  4. Paste:

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>DISPLAY</key>
    <string>:0.0</string>
    <key>PYTHONPATH</key>
    <string>/full/path/ofyour/favorite/script/dir:/full/path/of/another/script/dir:</string>
  </dict>
</plist>

Edit to what you need and save.

(This was written by the original poster as part of the question. Reposted as community wiki because I didn't write it, just cleaned up the formatting.)

2 Comments

Ah... how the hell did you do that? I tried but to no avail :(
@Jared: You need at least two blank lines between a numbered list and a code block. Seems to be a quirk of the Stack Exchange formatting engine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.