Mac Os X Run App From Command Line

If you don't have Apple Remote Desktop (ARD), you can enable the built-in VNC server on the XServe using the 'kickstart' command. Remote into the server with ssh and issue this command (should be all on one line and is wrapped here):

ln -s /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/k ickstart /usr/sbin/kickstart

Then do (should be all on one line and is wrapped here):

kickstart -configure -activate -users <nameofadminuser> -access -on -privs -all -clientopts -setvnclegacy -vnclegacy yes -setvncpw -vncpw <newvncpw>

Where <nameofadminuser> is the name of an admin level user on the server and <newvncpw> is the VNC password.
The first commandline sequence creates a symlink to the 'kickstart' binary in /usr/sbin and allows you to enter kickstart commands without the long path. The second sequence activates the ARD client on the server and grants all control privileges to the specified user, sets the user and password for the VNC server and activates it. Help for 'kickstart' commands can be obtaind by doing ' kickstart --help' on the commandline.
You now will be able to access the server with ARD or any VNC client application that supports, non-proprietary, legacy VNC protocols. You will have access to the GUI to allow you to run applications. If you use this method you should set the screensaver to lock the console after a set period of time as a basic security measure.
If you wish to run the community edition of the MySQL manager application, you may do so from a remote machine by starting the SQL server with networking enabled over port 3600. You should understand the security risk that may be present with doing so and may wish to consider tunneling the connection over ssh between your database server and your management application.
Opening applications from the command line is done with the 'open' command. See ' man open' for more information.
Mac

Command-Tab to bring up App-Switcher; Tab, Shift-Tab, or Arrow-key your way to the target app; H or Q to hide/quit the target app. This feature in Panther, stolen from Michael Kamprath's original App Switcher (now Keyboard Maestro, still useful in Jaguar), is one of the more attractive value-added features in Panther. In OS X 10.6, the open command was enhanced to allow passing of arguments to the application: open./AppName.app -args -AppCommandLineArg But for older versions of Mac OS X, and because app bundles aren't designed to be passed command line arguments, the conventional mechanism is to use Apple Events for files like here for Cocoa apps or here. Typically, to approve apps you want to install, you have to go into System Preferences, but OS X Daily shows off a slightly quicker route through the Command Line. To approve an app for Gatekeeper. Installing applications on macOS and OS X computers is easy to do when deploying the apps as packages through the Terminal using the Installer command for quiet deployments across your network. The program is actually installed in the TWAIN directory tree on the Mac. (Library/Image Capture/TWAIN Data Sources) When I log on to a 'regular' admin level account (that is, the account does have administrative privileges) the program will not run; it thinks for a bit, and then says 'please run as administrator'.

Wikihow.com

Jul 14, 2009 8:45 AM

Mac Os X Run App With Command Line Parameters

I suspect this is because the permission elevation is for the open command, not TextEdit itself. You should use a different editor that can have its binary run properly from the command line like SublimeText (sudo subl /path/to/file) or TextMate (sudo mate /path/to/file).Or just suck it up and use vi or nano:-). If you're going to be doing a lot of this type of thing TextEdit is probably the. 'open -a' is not the answer wanted, because I want to debug the Mac OS X application automatically. This means it's better if someone can give the command line like program args format. So ltrace mechanism can make program as target for debugging and take args as input.