Sometimes, to launch an OS X GUI app is easier than working with its command line counterpart. For example: Though I like “nano”, a command line text editor, my go-to text editor of choice is TextWrangler, a GUI app. Using the command “open” from the command line makes opening TextWrangler easy. Here is the string:
open /Applications/TextWrangler.app/
After typing the string and pressing the “return” key, TextWrangler opens in its own window. Adding “sudo” to launch an OS X GUI app, opens the app with admin privileges:
sudo open /Applications/TextWrangler.app/
If you want to open a program, with a file loaded in it:
open -a “QuickTime Player” ~/Desktop/filename.mp4
The ‘open” command is powerful. You can launch an OS X GUI App from the command line with many options. Here they are:
I don’t think it’s true anymore. When I try sudo open “/Applications/Chess.app” it still runs with user privileges.
Andreas:
Are you logged into your Mac as a “user” or an “admin”? Try as an “admin” and see if the “sudo open” process works. If not, here is a reference that may provide a solution:
https://www.wikihow.com/Open-Applications-With-Root-Privileges-on-a-Mac
Hope this helps.
Larry