Search with Google ingored open browser

I have Firefox open. Safari is not running. I highlight a mis-spelled word in document and use the context menu option Services > “Search with Google”. Despite Firefox being open and therefore listening for and accepting requests from other processes Safari is started.

I don’t like Safari because it does not have the range of add-on available that I expect to be there (including AdBlockPlus with my own blocking rules, immediately up to date Ghostery, GreaseMonkey, Lightbeam). Plus starting Safari up is much slower than Firefox responded to an inter-process request.

There doesn’t seem to be a way to force that context menu item to kick off the user’s preferred browser.

Mac OS X 10.8.5
Scrivener v2.5 (25239)
Firefox 30.0
Safari 6.1.1

  1. Open Safari.
  2. Go to Safari > Preferences.
  3. In the “General” pane of Safari’s preferences, change Firefox to the “Default web browser”.

It already is and has been set like that since I first powered this Mac up a couple of years ago.

Then it must be something else on your system interfering with the setting somehow. That setting makes it work as expected for me (the contextual menu opens Firefox even if it’s not open). Also, the code involved simply passes the Google URL to Cocoa’s general workspace object, which is responsible for opening the default application for the passed-in URL. No something on your system is telling Cocoa’s global workspace object that Safari is the default application in which to open web URLs. Does TextEdit have the same problem?

Seems to be a common Mac OS X issue. Apple totally disregard user preferences with Services > Search with Google. If Safari has Default Browser set to Firefox, Chrome, Tor then using Services > Search in Google always kicks off Safari not matter what. Workaround seems to be switch off that Service option in System Preferences > Keyboard > Keyboard Shortcuts.

For Scrivener that then means hunting around in the context menu for Writing Tools > Search in Google.

Neither solution is ideal. But with a workaround it’s usable. It’s totally cack handed by Apple.

Ah, I forgot the Services menu was invoking something entirely different - I thought that was using the same code as TextEdit, but no, it’s using a service provided by Safari. But you can just replace the Apple-provided service with your own that doesn’t require Safari:

superuser.com/questions/369934/m … ith-google

The shell script there didn’t work for me, but changing “Pass input” to “as arguments” and using the following command did:

open "http://www.google.com/search?q=$*&ie=UTF-8"