How to Run GUI Apps as root in Mac OS X
Those familiar with the command line know that running things with super user privileges is typically just a matter of using the sudo command. That still holds true with launching GUI apps into the OS X with root privileges, but it’s not just a matter of prepending sudo to the otherwise useful open command, because ‘open’ launches apps as the original user, with or without sudo. The solution instead is to use sudo pointing directly at the executable contained within a given applications package file.
Launching OS X GUI Apps as root user
The command syntax is as follows:
sudo /Path/To/Application/ApplicationName.app/Path/To/Executable
In most cases, that will be applications stored in the /Applications/ directory, and the executable is almost always stored in Package/Contents/MacOS/ as whatever the applications name is:
sudo /Applications/ApplicationName.app/Contents/MacOS/ApplicationName
For example, this command runs the familiar TextEdit app as root:
sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit
To launch TextEdit as a background app, meaning it wont close if you close the terminal window, apply the -b flag to sudo:
Read more »