Xquartz on Mavericks 10.9 fails
/Applications/Utilities/XQuartz.app/Contents/MacOS/X11 is just a shell script that executes whatever is defined as $SHELL in your environment:

case $(basename "${SHELL}") in
    bash)          exec -l "${SHELL}" --login -c 'exec "${@}"' - "${@}" ;;


(etc).

In your case, it look as though $SHELL is set to /usr/local/bin/bash, which doesn't exist. What's interesting, though, is that since you have a prompt at which you have typed xquartz, you clearly are running a shell of some description. However, it doesn't correspond to the value of $SHELL.

Two suggestions for how this might happen:


$SHELL will normally reflect the login shell for your user. You can set that in System Preferences -> Users &amp; Groups -> right click on your username and choose "Advanced Options". If you set this to an invalid value, you won't normally be able to open a terminal... unless you go into the Terminal.app preferences and set the "Shells open with:" option to something which does exist. You'll then get a working terminal with a non-existent $SHELL.
Alternatively, it might be something in your shell startup scripts (.bashrc, .profile, etc) which export a misleading value of $SHELL to the environment. If you have customized any of these, take a look and make sure you're not setting things up incorrectly.