31

I want to make the Search in Google context menu to open my default browser instead of Safari.

2
  • 1
    Same question asked on apple forums 2 years ago, without answers discussions.apple.com/message.jspa?messageID=6992413 - isn't this a monopoly issue?
    – sorin
    Commented Mar 29, 2011 at 10:33
  • "isn't this a monopoly issue?": Perhaps or maybe there are more important things to worry about over at Apple HQ... Commented Mar 29, 2011 at 18:24

2 Answers 2

12

I believe "Search in Google" is a Mac OS X service provided by Apple. Maybe since they don't know how to pass a webpage in parameter for every browser in the wild, I suppose they limited it to Safari.

What you might try, is to develop your own Service, then go to

System Preferences > Keyboard > Shortcuts > Services

Disable the "Search in Google" by Apple and replace it with your own.

You could also try to edit Apple's Service and replace Safari with the browser you want. Since I'm not on my Mac right now, I can't search for them or look if you can edit them.

5
  • @Mark I'm not saying saying to change the default browser, but to edit the Service itself so he won't call Safari but either the default browser or the browser he wants. Commented Mar 29, 2011 at 11:44
  • 2
    I'm sure that every browser in the wild will open a webpage if this is the only parameter passed by the command line. And BTW, it enough to test with 5 browsers, or let's say 4 for OS X :)
    – sorin
    Commented Mar 29, 2011 at 19:11
  • @loic-wolff I don't think you can edit the ready-made services, but you may create your own using a third-party app, such as Bellhop
    – nuc
    Commented Mar 29, 2011 at 19:22
  • 12
    > "Maybe since they don't know how to pass a webpage in parameter for every browser in the wild, I suppose they limited it to Safari." This is definitely false. OS X already has a preference for setting the default web browser for opening URLs. "Search with Google" blatantly ignores this setting. Also: open -a anybrowser http://google.com Commented Jan 31, 2014 at 20:33
  • 1
    Note that I don't think you can turn off "Search with Google" in Mail.app. I have disabled the service but the option still appears in the context menu in Mail.app.
    – Dale
    Commented Mar 20, 2017 at 18:26
6

The below worked for me. It shows how to create your own service that is independent of Safari.

1. Open Automator and choose the Service template
2. Add a Run Shell Script action for a script like `open "http://www.google.com/search?q=$(ruby -rcgi -e 'print CGI.escape $<.read.chomp')"`
3. Save the service and assign it a shortcut from System Preferences

https://superuser.com/questions/369934/mac-os-x-lion-chrome-shortcut-for-search-with-google

1
  • except the Preview.app ;(
    – andilabs
    Commented Jan 7, 2023 at 1:27

You must log in to answer this question.

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