How to use Process.Start() or equivalent with Mono on a Mac and pass in arguments

To make Process.Start use exec directly instead of using the OS’ mechanism for opening files, you must set UseShellExecute to false. This is also true on Linux and Windows.

Process.Start(new ProcessStartInfo (
    "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
    "--no-first-run")
    { UseShellExecute = false });

Note that you can also use ‘open’ for your use case, to run the Chrome app bundle properly. Use the ‘-a’ argument to force it to run a specific app, the ‘-n’ argument to open a new instance, and ‘–args’ to pass in arguments:

Process.Start(new ProcessStartInfo (
    "open",
    "-a '/Applications/Google Chrome.app' -n --args --no-first-run")
    { UseShellExecute = false });

Leave a Comment