title: Mac OS X 10.9 - setting permanent environment variables
body: <p>How do I set a permanent environment variable (i.e. one that does not need exporting every time I start a new Terminal session) in Mac OS X 10.9? I've found a number of answers about modifying my <code>.bash_profile</code> and <code>.profile</code>, however neither of these options seem to work as permanent solutions - only temporary. The variable I'm trying to set is <code>MULE_HOME</code>. I have the following line in my bash profile:</p>
  
  <pre><code>export MULE_HOME=$(/opt/mule-standalone-3.4.0)
  </code></pre>
  
  <p>However, when I start Terminal I get the following line (not sure if this is normal behaviour?):</p>
  
  <pre><code>-bash: /opt/mule-standalone-3.4.0: is a directory
  </code></pre>
  
  <p>And running a simple <code>env</code> command returns the following:</p>
  
  <pre><code>TERM_PROGRAM=Apple_Terminal
  SHELL=/bin/bash
  TERM=xterm-256color
  TMPDIR=/var/folders/fc/68bqp4jj411gynj5qvwhq6z1shs1fy/T/
  Apple_PubSub_Socket_Render=/tmp/launch-xKtkql/Render
  TERM_PROGRAM_VERSION=326
  TERM_SESSION_ID=E97BFE4B-AF85-4933-B252-0883CC085349
  USER=dan
  SSH_AUTH_SOCK=/tmp/launch-rEmTWW/Listeners
  __CF_USER_TEXT_ENCODING=0x730C85DE:0:0
  PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
  __CHECKFIX1436934=1
  PWD=/Users/dan
  JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home
  LANG=en_GB.UTF-8
  MULE_HOME=
  SHLVL=1
  HOME=/Users/dan
  LOGNAME=danwiseman
  _=/usr/bin/env
  </code></pre>
  
  <p>In order to get around this I'm currently having to type <code>export MULE_HOME=/opt/mule-standalone-3.4.0</code> every time I start a new Terminal session which, whilst not strenuous, is a little inconvenient. What am I doing wrong here that is causing the variable to only be set temporarily? Thanks in advance.</p>