15

This is what I get when I try to start the executable:

Mac-Pro:MacOS george$ /Applications/Firefox.app/Contents/MacOS/firefox
dyld: Library not loaded: /usr/lib/libsqlite3.dylib
  Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
  Reason: Incompatible library version: Security requires version 9.0.0 or later, but libsqlite3.dylib provides version 1.0.0
/Applications/Firefox.app/Contents/MacOS/run-mozilla.sh: line 131:  9870 Trace/BPT trap          "$prog" ${1+"$@"}

I also tried:

MacOS george$ open -a /Applications/Firefox

FSPathMakeRef(/Applications/Firefox) failed with error -43.

Is there a particular way to start the application from the command line?

3 Answers 3

23

The problem with your second attempt is that your path does not include the .app extenstion.

Try using either

open -a /Applications/Firefox.app

or

open /Applications/Firefox.app
2
  • Correct. I verified. The "old hit tab key to autocomplete trick" fixes that one for me.
    – Grady Player
    Apr 29, 2011 at 21:48
  • 4
    open -a Firefox works just as well (unless you have multiple instances of the same program installed).
    – Daniel Beck
    May 1, 2011 at 0:35
28

These examples will open Firefox, open a specific website, or browse your user's home directory.

open -a firefox
open -a firefox -g http://news.google.com
open -a firefox -g $HOME
2
  • 3
    If anyone is wondering about -g, it opens an application on the background, so that it will either be placed behind the frontmost application or have no visible windows.
    – Lri
    Sep 19, 2012 at 11:16
  • Much better than accepted answer, this one is easy to remember! By analogy: open -a 'Google Chrome' or open -a 'Brave Browser' May 17 at 15:00
9

You want to run /Applications/Firefox.app/Contents/MacOS/firefox-bin

1
  • 1
    You can also use /Applications/Firefox.app/Contents/MacOS/firefox without the -bin. To open a new tab in an existing window you can do /Applications/Firefox.app/Contents/MacOS/firefox --new-tab https://mail.google.com. To see other options, use /Applications/Firefox.app/Contents/MacOS/firefox --help
    – SgtPooki
    Nov 4, 2020 at 6:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.