- If you want to start a MacOSX applications from a terminal (or a shell script) you have to use the open command, i.e.:
open /Application/Firefox.app(based on xahlee.org)
- If you need to write a wrapper starting a binary file (which is inside of a MacOSX app) with some options you can use following construction:
HERE=`dirname $0`; $HERE/name.x -optionsThe same construction is useful if you need to set some environment variables.
- Sometimes is it necessary to have a location of an app, but apps can be place in a very strange places. MacOSX binaries are located third level deep inside of an app, so the following command save location of an app in the TOPDIR variable:
TOPDIR=`cd $HERE/../../../; pwd`