Symlink to app causes NSInternalInconsistencyException I want to be able to run a graphical program from the command line, so I add a symlink to the program (/Applications/Stata/Stata.app/Contents/MacOS/Stata) from /usr/local/kkjj/bin/xstata. When I run xstata, I get an uncaught NS. 

Here's the whole output to stderr: http://pastebin.com/RsvJrcPr

Is there any other way to deal with this than with an alias?
This Error indicates that the Application can't find its InterfaceBilder (NIB) File (the GUI Part of the App). Probably caused by the Fact that the App has stored the relative Path to its NIB.

When you use double Click to open or  the whole path to the App as Terminal command it works (correct directory) but not with your symlink (which is stored at another location -> relative path is changed)

There are three Solutions how you can run the App from Terminal without a symlink.


Create an alias in your ~/.profile which points to the App (absolute path).
Use the command open open -a &lt;Application Name&gt;
Create a shell script named like the App which launches the App with the open Command (like 1.) or the absolute path (like 2.) 


hope this helps