How to stop Google search from opening Safari

Discussion in 'macOS High Sierra (10.13)' started by ronross, Mar 18, 2018.

  1. ronross macrumors newbie

    Joined:
    May 14, 2008
    Location:
    MO
    #1
    Hello,

    I hope I'm at the right forum for assistance to my question. If not, please feel free to redirect me to the correct discussion location.

    I currently use Chrome as my web browser. Whenever I highlight and click "Search with Google", it opens Safari instead of staying within Chrome. I understand OSX is coded to do this, however I have been reading that automator can create a script to force searching with google to stay or open the Chrome browser.

    If anyone can assist me on how to accomplish this, I would be eternally grateful. Please understand I have very little knowledge of how to use automator, but I can follow direction and am not afraid to try.

    Thanks,
     
  2. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #2
    I think what you need to do is go here in System Prefs and set Chrome as your default browser.

    Screen Shot 2018-03-18 at 12.22.41 PM.png
     
  3. ronross thread starter macrumors newbie

    Joined:
    May 14, 2008
    Location:
    MO
    #3
    There seems to be some disconnect here. I have Chrome as my default browser in System Preferences>General. That isn't the issue. The concern is when I have an app open and highlight a word within the app with my mouse. I then right click and a dialog box opens with the option to search with Google. If I highlight and click that, Safari opens a new window. That's the issue. I do not want Safari opening a new window. I don't want Safari to open at all. It appears that "Search with Google" is coded to open Safari.
     
  4. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #4
    I see what you mean. I just changed that setting to Chrome and it has not effect of the right click behavior you mentioned when I just tested in TextEdit. Sorry I'm not more help.
     
  5. flowrider macrumors 603

    flowrider

    Joined:
    Nov 23, 2012
    #5
    Try opening Safari, go into Safari Preferences and choose Search. Under the Search Tab, choose another Search Engine other than Google. And deselect any boxes that are checked.

    Lou
     
  6. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #6
    I have DDG selected there Lou and even with Chrome set as the default browser it opens Safari.
     
  7. ronross thread starter macrumors newbie

    Joined:
    May 14, 2008
    Location:
    MO
  8. BasicGreatGuy Contributor

    BasicGreatGuy

    Joined:
    Sep 21, 2012
    Location:
    In the middle of several books.
    #8
  9. flowrider macrumors 603

    flowrider

    Joined:
    Nov 23, 2012
    #9
    Hmm, I just tried this in both Firefox and Chrome and in both instances Safari did not open, and Google worked as intended in the Browser open at the time.

    Lou
     
  10. jbarley macrumors 68040

    jbarley

    Joined:
    Jul 1, 2006
    Location:
    Vancouver Island
    #10
    I just now tried this with FireFox,(my browser of choice) and it opens the selection in a new browser tab in FireFox.
    Sorry I cannot test Chrome as I do not have it available.

    MacPro 3,1 running High Sierra.
     
  11. ronross thread starter macrumors newbie

    Joined:
    May 14, 2008
    Location:
    MO
    #11
    2.jpg 3.jpg

    Try this: Open an email. Highlight any word (preferably a noun or verb - for simplicity). Right click and "Search with Google". Tell me if Google opens Safari and provides the Google search within Safari. That is what is happening to me. I would prefer to keep the "Search with Google" option inside of Chrome, but from everything i've read, it's hard coded within OSX.
     
  12. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #12
    Try it in something other than a browser so it uses the macOS service and I think you will see the behavior OP describes. I tried in TextEdit and it opens Safari no matter what I set the default browser to.
     
  13. BigMcGuire Contributor

    BigMcGuire

    Joined:
    Jan 10, 2012
    Location:
    California
    #13
    Yeah I've had this happen on a handful of areas - not easily replicated. Worse in Windows when you have Chrome set as default but it still insists on opening IE for specific things.
     
  14. ronross thread starter macrumors newbie

    Joined:
    May 14, 2008
    Location:
    MO
    #14
    Exactly.

    I was hoping someone would finally be able to understand the issue. Probably my fault for not clearly explaining it. Now, can we get a solution, or is this the way it's going to be?

    Thanks.
     
  15. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #15
    I've got it worked out using that Automator action at the site you linked.

    Do this... open Automator and tell it you want to make a Service. Then in the left column drag Run Shell Script over to the right like in my screenshot. Now paste in the line below.

    Code:
    open "http://www.google.com/search?q=$(ruby -rcgi -e 'print CGI.escape $<.read.chomp')"
    Do command-s to save and name it Search in Google or whatever you want. Quit Automator.

    Go to System prefs General and set the default browser to Chrome. Now also in System Prefs go to the Keyboard pane and in Shortcuts > Services make sure your new Search in Google service is checked (mine was on its own).

    Now test in TextEdit or whatever. Worked for me.
     

    Attached Files:

  16. MAlexB macrumors member

    MAlexB

    Joined:
    Oct 10, 2017
    #16
    I filed a bug report on this some months ago...
     
  17. ronross thread starter macrumors newbie

    Joined:
    May 14, 2008
    Location:
    MO
    #17
    Unfortunately it didn't work.

    I see the option to "Search in Google". I check marked it with no keyboard shortcut. Also, it was noted that "Search with Google" was also listed in services, which I unchecked assuming both would create a conflict. Needless to say, the entire process seems to not work outside of Chrome. In other words, if I search a word within the four corners of Chrome, it uses Google. If I search a word outside of Chrome, ie. text editor, email it forces Safari to open and search.
     
  18. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #18
    You must be missing a step or something... I did this on High Sierra and it works exactly like you want it to.

    Did you setup the Automator service step by step following my instructions? Did you change the default browser to Chrome?
     

Share This Page