Skip to main content
Question

Force incognito mode in Mac Google Chrome

  • Aug 22, 2024 7:06 PM UTC
  • 2 replies
  • 133 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
  • Aug 22, 2024 8:50 PM UTC

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
  • Aug 28, 2024 8:18 AM UTC

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.