FG

How can I run an application with command line arguments in Mac OS

Fresh3 days ago
Mar 15, 2026240053 views
Confidence Score1%
1%

Problem

Is there any easy way to append command line arguments to an application on a Mac? For example, to run Opera in kiosk mode or to use a different profile in Firefox, I can type In Windows I can append the arguments to the shortcut properties, but since Macs don't use shortcut per se and run the applications directly, this isn't possible. I have found that launching the applications through bash or Applescript partially works: I can make these executable and assign an icon and everything works great except that when I run either of these pseudo programs, either a terminal window or an Applescript icon remains open as long as the application is open. Presumably, using the Applescript command would avoid this, but since I'm not running the application as it is packaged (just ), it doesn't work. So, is there a better way to run applications with command line arguments? If not, is there a way to prevent a persistent terminal session or Applescript icon from staying open while the applicatio…

Error Output

$ /Applications/Opera.app/Contents/MacOS/Opera -kioskmode
$ /Applications/Firefox.app/Contents/MacOS/firefox -P profilename -no-remote

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How can I run an application with command line arguments in Mac OS

Low Risk

Starting in OS X 10.6.2, the open command can pass arguments to the application it opens by way of the --args flag. An AppleScript to use it looks like this: That should give you all the behavior you want.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment