Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force Mac OS to open "Search with Google" in Chrome [closed]

While using Mac OS, its very useful to use "Search with Google" tool in context menu to directly search selected text from error windows or other content:


enter image description here


But problem is, that it always open Safari by default. I have Google Chrome as default browser, but it makes no sense.

Does anyone know how to force this option open in Google Chrome instead of Safari?

like image 237
zur4ik Avatar asked Jul 29 '13 22:07

zur4ik


People also ask

How do I force a URL to open in a specific browser Mac?

I use the context menu on the URL file to open the site in any browser: Right click and select the Info sheet. Beneath "Open With", select Other -> Show all Applications. Select the web browser of your choice.

How do I get Google to open automatically on my Mac?

If that does not apply to you, go into Apple menu -> System preferences -> Accounts and select your startup account. Startup Items are listed there. The solution for me was to right-click (or control-left-click) the Chrome icon in the dock, select "Options", and make sure "Open at Login" is deselected.


1 Answers

The OP is not using the context menu in Chrome, and does not have the "Search Google for...." option.

The "Search with Google" entry is provided by Safari and won't work with another browser to my knowledge.

The closest thing that I found in my journey to provide the same desire was to create a service of your own using Automator.

Instructions:

  1. Open Automator and choose Service as the type
  2. Add a "Run Shell Script" action by dragging it to the right pane enter image description here
  3. Add script

    open "http://www.google.com/search?q=$(ruby -rcgi -e 'print CGI.escape $<.read.chomp')"

    Adjust the TLD as needed for your country specific Google page. ex: http://www.google.co.in/search?q=

  4. Save the service as "Search Google"

  5. Activate the service in System Preferences and optionally assign a keyboard shortcut. Once activated, "Search Google" will appear in the context menu enter image description here
like image 163
Casper Avatar answered Oct 04 '22 16:10

Casper