XQuartz will not start on Mac 10.9 Maverick - infinite failure loop
Solution 1:
Xquartz: bootstrap_look_up(): Unknown service name
That indicates that you did not logout and log back in as instructed to do by the installer.
But that should not be a fatal problem.
The most likely solution is that you have bad shell initialization scripts. You can test this by doing:
sudo mv /Applications/Utilities/XQuartz.app/Contents/MacOS/X11{,.bak}
sudo mv /Applications/Utilities/XQuartz.app/Contents/MacOS/X11{.bin,}
After testing, you can undo that via: sudo mv /Applications/Utilities/XQuartz.app/Contents/MacOS/X11{,.bin} sudo mv /Applications/Utilities/XQuartz.app/Contents/MacOS/X11{.bak,}
Solution 2:
Are either your .bashrc or .profile exiting when non-interactive?
These symptoms are similar to those I have seen with my Mac OS Mavericks system. Numerous web searches show people with similar issues. Some responses (where there were any) suggested "something is wrong with your .profile or .bashrc". Mine looked, ostensibly, correct.
What I finally discovered was my .profile was 'source'ing my .bashrc and my .bashrc had an ancient test for interactivity:
# If not running interactively, don't do anything
[ -z "$PS1" ] && exit
Changing the "exit" to a "return" did the trick.