Changing default browser

clairevl
New Contributor

Hi all!

We are currently testing our implementation of Jamf Pro Cloud. I am trying to set Chrome as the default browser for my organization, but I cannot find the option to do that through Jamf. And anything online about this is over a few years old. I just wanted to check in and see if there has been a change to this, or if anyone has a clever way of getting around it!

Thanks!

1 ACCEPTED SOLUTION

Samstar777
Contributor II

Hello,

Here is the easy and best way to manage Chrome Browser through jamf.

https://support.google.com/chrome/a/answer/9923111?hl=en

 

Regards,

Salim Ukani

View solution in original post

42 REPLIES 42

Errick_Pfuhl
New Contributor III

There has not been a change afaik due to it being a user based setting. You can always try 

open -a "Google Chrome" --args --make-default-browser

 

and see if that works. I think it would need to be a script run in a policy once per user / per computer. May also need to run it as the user by following this: https://scriptingosx.com/2020/02/getting-the-current-user-in-macos-update/

I think this one is the real correct answer. There doesnt seem to be a way to script it without adding a 3rd party app to do it and I needed it to automatically set rather than give users the choice so I added another message to the script to make sure users know what they should do:

/usr/local/bin/jamf displayMessage -message "Please set Google Chrome as the default browser"
open -a "Google Chrome" --args --make-default-browser

 

YanW
Contributor III

This is what I use. We let users pick

 

#!/bin/bash

osascript <<EOD
set result to button returned of (display dialog "Set default browser to Chrome")
if result = "OK" then
	do shell script ("open -a 'Google Chrome' --args --make-default-browser")
else
	display dialog "No change in the default web browser"
end if
EOD

 

 

JRM5513
New Contributor III

 

deleted

DonCascone
New Contributor II

Do you think this script could be use to just force users to have Chrome as their default browser, without any interaction?
Do you know how to push the script after Chrome is already installed on the device?
Thank you!

if the script works then you could run via a policy scoped to a Smart group to check if Chrome is installed but from my tests Apple still will show a box confirming you want Chrome to be default.

DonCascone
New Contributor II

Have you been testing with the script above?
It's ok for me even if the apple popup shows up asking you to make it the default browser

JRM5513
New Contributor III

I'm using this this script after Chrome installation. You need to fill parameter 4 with com.google.Chrome. Works after a computer restart.

jeremyb_1-1643561122097.png

Thanks I just took out the parts about Apple Mail and confirmed this worked on a machine after a reboot! Maybe I will just add a reboot in the script to make sure it happens.

Samstar777
Contributor II

Hello,

Here is the easy and best way to manage Chrome Browser through jamf.

https://support.google.com/chrome/a/answer/9923111?hl=en

 

Regards,

Salim Ukani

This worked for me! Thanks!

Can you show me how to set up chrome as default browser with this? I tried to follow Google's instruction, but could not find any attribute regarding to default browser setting. Another python script is no longer working with latest Monterey update. Thanks!

LukeMason
New Contributor III

@Samstar777 As with other confused people below, I don't understand how this is marked as the solution.

Your link provides instructions for how to manage updates, but I don't see how you would manage the default browser using this method.  These are 2 different things.

Please provide instructions on how you can use the above link to manage the default browser for a user...

Samstar777
Contributor II

Hello Jonna1006,

 

I have dm you, lets connect over messages or slack so that I can guide you how to do it.

My Slack ID is Samstar777

 

-Sam

I have the same question as Jonna1006. Is there a publicly available document on this?

Samstar777
Contributor II

Hello lturnerz: below are very simple steps to manage this through jamf Pro

 

Deploy Chrome Browser update policies

  1. Sign into the Jamf Pro console.
  2. On the left, click Computers
     

     

    Configuration profiles.
  3. On the top right, click New.
  4. On the Options tab of your new macOS configuration profile, click Application & custom settings > External applications.
  5. On the top right, click Add to add a new configuration. 
  6. Under Source, select Repository.
  7. In Application domain, select com.google.keystone, then choose the app version and the stable variant.
  8. Configure the values as needed under the Google Chrome section.
  9. Name the profile and assign it to any other configuration profile in Jamf Pro. 
  10. Deploy the profile to your machine.

 

-Sam

I am very new to this, can you show me a screenshot on how to set Chrome as default browser? Thanks!

JRM5513
New Contributor III

I don't think you can make Chrome the default system browser within the Chrome update policy. This thread is so confusing, people are talking about two different things here. You should take a look at this bash script I posted earlier. It's still working for me on 12.2 after a Mac reboot.

I have tried the script, but it did work at my end, is something I have to change to make it work?

lturnerz
New Contributor

Many thanks, Samstar777!

 

jonna1006
Contributor

iMazing Profile Editor did the trick for default browser setting, kudos to Jamf Support team!!

How did you do this with iMazing Profile Editor?  What payload did you edit to set the default browser?

It is the first page of Chrome configuration page, just check the box and it will force a pop message to ask user which is default browser.

Screen Shot 2022-02-28 at 10.27.00 AM.png

noobody
New Contributor III

How does this work in your environment once deployed? From my testing, if a user doesn't already have Chrome set as the default browser in System Preferences>General>Default Web Browser, once a user opens Chrome they are not prompted to select the default browser without first having to click the Set as Default button anyway. Meaning, it's the same as doing nothing at all.

Is this what you are experiencing as well? This is happening on a couple of test machines running Big Sur.

Never tested on Big Sur, but for Monterey, it should have a pop initiation let the user to confirm which is default browser once the user login to the Mac.

noobody
New Contributor III

Without launching a browser at all? Interesting.  I'm gonna update to Monterey to see if there is any change to the way the profile works there.

Thanks.

It has been a while, but I do not recall that I have to open the browser to see the pop-up notification.

noobody
New Contributor III

No change after upgrading my M1 Mac to Monterey and testing this. Are you also deploying to M1 Macs or Intel Macs only (wonder if there is something happening there)? You mind pasting your PLIST from your config to compare?

I just finished setup for couple M1 Pro MBP, no issue from my end. If you are using iMazing Profile Editor, make sure you sign the profile before uploading to Jamf cloud.

I recently tested on both x86 and ARM MBP, and once you open Chrome for the first time, there will be prompt to ask which browser you want to set as default.

Hi Jonna, Would be kind enough to show me the steps that you did on Imazing? Sorry Im new with jamf as well

noobody
New Contributor III

For those still wondering, you'll need to use iMazing Profile Editor to create the config profile with the Google Chrome payload which includes the Set Google Chrome as the default web browser option which is all you need and then to sign the profile.

The part where I was having trouble was the importing of this profile into Jamf Pro because in Jamf Pro after importing the signed profile, no payload showed up for this profile in Jamf Pro. I did not realize that this was normal because Jamf Pro has no corresponding Google Chrome payload. But once you deploy it out it should work to prompt the user to choose their default browser when they launch Google Chrome.

TLDR: Sign the iMazing profile before importing it in Jamf Pro or it won't work.

YanW
Contributor III

Doing all that to get a prompt, what's the different from my script above which also prompt user to set Chrome as default? 

noobody
New Contributor III

No difference at all. In fact, your script looks to be a better option as it requires much less legwork.

I think the config profile is better because it’s forced where as the script needs to run at least once.

jmancuso
New Contributor III

https://chromeenterprise.google/policies/?policy=DefaultBrowserSettingEnabled here is the syntax for the https://support.google.com/chrome/a/answer/9923111?hl=en workflow. like you would for a plist you enter in the syntax given from the first article in save. scope and test. Although, this is not practical for engineering orgs. As if you set it to true it hardens itself to Chrome. Blank lets the user decide. 

MatG
Contributor III

This is all you need, user will get the prompt on launch of Chrome though.

Screenshot 2022-06-29 at 14.18.14.png

Can you post that plist in text form, so I don't have to manually transcribe what's in the screenshot?