Skip to main content
Question

Force incognito mode in Mac Google Chrome

  • August 22, 2024
  • 2 replies
  • 22 views

Forum|alt.badge.img+3

I have tried a few methods and scrips but I was not successful. Any has a solution or a way to make the script below work ?

 

!/bin/bash

defaults write com.google.chrome IncognitoModeAvailability -integer 2

 

Thanks

2 replies

AJPinto
Forum|alt.badge.img+26
  • Legendary Contributor
  • 2802 replies
  • August 22, 2024

Scripts run in the root space. If you are setting the value correctly, you are setting it for the root user not the person using the device. 

For managing settings you need to use a Configuration Profile, not a script. 


RaGL
Forum|alt.badge.img+7
  • Contributor
  • 36 replies
  • August 28, 2024

To create the config profile do the following:

1. Create a new configuration profile

2. At "Application & Custom Settings" click on "Upload" and "Add"

3. At preference domain enter "com.google.Chrome" (case-sensitive)

4. At Property List enter:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

  <dict>

    <key>IncognitoModeAvailability</key>

    <integer>2</integer>

  </dict>

</plist>

5. After deploying it you can check via "chrome://policy/" if the config profile did apply.