title: How to change default working directory on Mac OS X?
body: <p>When I double click on a Unix executable file on Mac OSX, the current working directory defaults to:</p>
  
  <pre><code>/Users/myusername
  </code></pre>
  
  <p>However, the executable file is actually in another directory.  How can I set the working directory to be the executable's directory instead of the <code>/Users/myusername</code>?  I know that you can do this in the source code, but is there some setting on Mac that allows you to change this prior to initial execution.</p>
  
  <p>Has anyone run into this problem in the past?  It seems like a pretty default issue.  </p>