Mac OS X

From SaniWiki

Jump to: navigation, search

A page for the different stuff I set up after I've installed my Mac.

Contents

[edit] $PATH for applications that are not run from the CLI

Programs that I don't start form the CLI don't get my custom set $PATH. For example I want to use some programs in emacs in Mac OS X but it can't automatically find the programs since they aren't in path. I don't want to mess up my configuration files that are cross-platform with absolute paths.

What can be done is to add the standard $PATH I want to the file ~/.MacOSX/environment.plist

So for instance with PostgreSQL installed from EnterpriseDBs installation package and Macports installed it would look like:

   <?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
   <plist version="1.0">
   <dict>
       <key>PATH</key>
       <string>/opt/local/bin:/opt/local/sbin:/Library/PostgreSQL/8.4/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin</string>
   </dict>
   </plist>

Remember to extend your own PATH in your shells file, eg $PATH:~/bin etc

[edit] Applications to be installed through Macports

Install Macports and make sure Macports is in your path and takes precedence over the standard system paths. Eg /opt/local/bin before /usr/(local/)?bin

[edit] Python

Install these packages with Macports:

  • python26
  • py26-pip
  • python_select (if several versions of python installed through macports)
    • python_select python2.6 # the version of python that the python-binary will be symlinked to

Make sure your python site-packages bin-dir is in PATH. At the time of writing with python 2.6 installed it is:

 /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin

[edit] Ruby

Install these packages with Macports:

  • ruby1.8
  • rubygems