From 13071e71bed8508e7ff1c514372df7c3cc3dd756 Mon Sep 17 00:00:00 2001 From: Fedor Korotkov Date: Tue, 23 Jan 2024 23:14:16 +0400 Subject: [PATCH] Just enable remote automation for Safari (#120) Enabling `Develop` menu started failing in 14.3 with: ```console Could not write domain /Users/admin/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari; exiting ``` We actually only interested in enabling remote automation for CI which is done by `safaridriver`. Having `Develop` menu item is not necessary. --- templates/vanilla-monterey.pkr.hcl | 4 +--- templates/vanilla-sonoma.pkr.hcl | 4 +--- templates/vanilla-ventura.pkr.hcl | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/templates/vanilla-monterey.pkr.hcl b/templates/vanilla-monterey.pkr.hcl index 7c277f6..b07e129 100644 --- a/templates/vanilla-monterey.pkr.hcl +++ b/templates/vanilla-monterey.pkr.hcl @@ -102,10 +102,8 @@ build { "disown", "sleep 30", "kill -9 $SAFARI_PID", - // Enable Safari's remote automation and "Develop" menu + // Enable Safari's remote automation "sudo safaridriver --enable", - "defaults write com.apple.Safari.SandboxBroker ShowDevelopMenu -bool true", - "defaults write com.apple.Safari IncludeDevelopMenu -bool true", // Disable screen lock // // Note that this only works if the user is logged-in, diff --git a/templates/vanilla-sonoma.pkr.hcl b/templates/vanilla-sonoma.pkr.hcl index 4d665b3..c812797 100644 --- a/templates/vanilla-sonoma.pkr.hcl +++ b/templates/vanilla-sonoma.pkr.hcl @@ -112,10 +112,8 @@ build { "disown", "sleep 30", "kill -9 $SAFARI_PID", - // Enable Safari's remote automation and "Develop" menu + // Enable Safari's remote automation "sudo safaridriver --enable", - "defaults write com.apple.Safari.SandboxBroker ShowDevelopMenu -bool true", - "defaults write com.apple.Safari IncludeDevelopMenu -bool true", // Disable screen lock // // Note that this only works if the user is logged-in, diff --git a/templates/vanilla-ventura.pkr.hcl b/templates/vanilla-ventura.pkr.hcl index 8ce862a..ff0e5a0 100644 --- a/templates/vanilla-ventura.pkr.hcl +++ b/templates/vanilla-ventura.pkr.hcl @@ -108,10 +108,8 @@ build { "disown", "sleep 30", "kill -9 $SAFARI_PID", - // Enable Safari's remote automation and "Develop" menu + // Enable Safari's remote automation "sudo safaridriver --enable", - "defaults write com.apple.Safari.SandboxBroker ShowDevelopMenu -bool true", - "defaults write com.apple.Safari IncludeDevelopMenu -bool true", // Disable screen lock // // Note that this only works if the user is logged-in,