I'm trying to open an app in the background from the Terminal by using the -g or --background flags like so

open -g -a Franz

Unfortunately, the app isn't opening in the background. I've also tried the j flag, which is supposed to hide the app, according to the help:

Usage: open [-e] [-t] [-f] [-W] [-R] [-n] [-g] [-h] [-b <bundle identifier>] [-a <application>] [filenames] [--args arguments]
Help: Open opens files from a shell.
      By default, opens each file using the default application for that file.  
      If the file is in the form of a URL, the file will be opened as a URL.
      -a                Opens with the specified application.
      -b                Opens with the specified application bundle identifier.
      -e                Opens with TextEdit.
      -t                Opens with default text editor.
      -f                Reads input from standard input and opens with TextEdit.
      -F  --fresh       Launches the app fresh, that is, without restoring windows. Saved persistent state is lost, excluding Untitled documents.
      -R, --reveal      Selects in the Finder instead of opening.
      -W, --wait-apps   Blocks until the used applications are closed (even if they were already running).
          --args        All remaining arguments are passed in argv to the application's main() function instead of opened.
      -n, --new         Open a new instance of the application even if one is already running.
      -j, --hide        Launches the app hidden.
      -g, --background  Does not bring the application to the foreground.
      -h, --header      Searches header file locations for headers matching the given filenames, and opens them.

The app opens in the foreground as if the I had simply called

open -a Franz

Any idea why this doesn't work and an alternative?

  • I've tested it with several applications on macOS 10.12.5 and it works well. The problem is maybe related to the Franz application. Jun 16, 2017 at 20:34
  • 1
    I’m having the same issue, where certain apps don’t respect the flags. I can open Messages in the background, but trying to open Books with the same flags opens it in the foreground. Annoying that Apple’s own apps don’t work with this…
    – elstgav
    Feb 9, 2020 at 19:52
  • 1
    For future readers: the conflicting reports in this Q&A are probably caused by exactly which app is being opened. For example, Google Chrome refuses to respect either -g or -j (or -gj for that matter), but Firefox and Safari work perfectly with just -g. Aug 9, 2022 at 15:59

3 Answers 3


If you call the command open with --hide (-j) it works (at least in macOS Sierra). For instance

open -j -a /Applications/Skype.app

Also, the -g flag helps some

open -gj -a /Applications/Skype.app
  • 3
    Unfortunately it seems that this answer does not work for more recent versions of MacOs, as Catalina
    – Galuoises
    Apr 15, 2020 at 16:40
  • Second one worked on the Catalina Feb 17, 2022 at 7:36
  • open -gj -a "Name of Application" works perfectly
    – BabyBoy
    Jun 12, 2022 at 11:15
  • None of these work on Ventura 13.1.
    – camursm
    Feb 2, 2023 at 19:35

As of writing (10.14.3 Mojave), the correct answer is:

open -a /Applications/Skype.app -gj

If you do

man open

you can see that

-g Do not bring the application to the foreground.

-j Launches the app hidden.

  • Thanks. Not on Mojave yet, but will keep in mind for when I upgrade.
    – willlma
    Mar 21, 2019 at 19:36
  • Does not work for me (10.14.6 Mojave)
    – milushov
    Dec 30, 2019 at 14:35
  • That doesn’t really address the question—they’re trying to open the app in the background, not hidden.
    – elstgav
    Feb 9, 2020 at 19:53
  • 1
    Works for me with macOS 10.14.6 (18G3020) for NetNewsWire.app: The app is launched and immediately hidden without the screen flickering or something like that.
    – NSSynapse
    Mar 6, 2020 at 11:22
  • The OP states that they have already tried -g and -j.
    – MEMark
    Dec 5, 2021 at 19:12

You have to specify the -j and -g before the -a

For example:

open -gja /Applications/Calendar.app
  • 1
    OP states very clearly that the -j flag does not work.
    – IconDaemon
    Apr 7, 2020 at 20:35
  • Right, essentially it works only in combination with the -g (--background) and -j (--hide) Flag
    – BabyBoy
    Jun 12, 2022 at 11:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .