Skip to content Skip to sidebar Skip to footer

Webbrowser.get("firefox") On A Mac With Firefox "could Not Locate Runnable Browser"

I think what I need here is to know which magic command-line or OSA script program to run to start up a URL in an existing Firefox browser, if one is running, or to also start up F

Solution 1:

You should use Launch Services to open the URL. You can do this with the LaunchServices module, or with Apple's open utility, or with my launch utility (here):

open is probably easiest:

% open -b org.mozilla.firefox http://www.stackoverflow.com/

(or, of course, the equivalent in Python with subprocess or similar) should do what you want.

Solution 2:

Apple uses launch services to find applications. An application can be used by the open command - Apple developer man page for open

The python command you want is

client = webbrowser.get("open -a /Applications/Firefox.app %s")

Following Nicholas Riley 's comment

If Firefox is on the list of Applications then you can get away with open -a Firefox.app %s

Post a Comment for "Webbrowser.get("firefox") On A Mac With Firefox "could Not Locate Runnable Browser""