Starting Mac OS X Applications (as root) from the console

I recently wanted to start Mac OS X Applications from the console. Sometimes it is possible to start an application directly if it’s possible to find the executable in the application folder. But sometimes, espaccially for application installers there is no executable. In this case it is possible to start the application (or installer) by using the open command. e.g. to start TextEdit:

open /Applications/TextEdit.app

The open command does the same as clicking on a file / application. So you could open a pdf document like this:

open document.pdf

Sometimes an installer requires to run as a superuser. Starting the installer with

sudo open /Applications/INSTALLER_APP

unfortunately does not work, because only open will run as a superuser, but not the installer itself. To start the installer as superuser the following might help:

  • pkg installer:
  • sudo ./MyApplication.app/Contents/MacOS/Installer
  • other installers (no linebreak!)
  • sudo /System/Library/Frameworks/Carbon.framework/Versions/A/Support/LaunchCFMApp \
      ./MyApplication.app/Contents/MacOS/application

Tags: , , , , , , , , ,

One Response to “Starting Mac OS X Applications (as root) from the console”

  1. jmerkel Says:

    Yes, thats where usefully especially if you want to see the console output (e.g. error messages).

Leave a Reply