diff --git a/coin/provisioning/qtci-macos-10.12-x86_64/005-systemsetup.sh b/coin/provisioning/qtci-macos-10.12-x86_64/005-systemsetup.sh index 4577709f..5819e9de 100755 --- a/coin/provisioning/qtci-macos-10.12-x86_64/005-systemsetup.sh +++ b/coin/provisioning/qtci-macos-10.12-x86_64/005-systemsetup.sh @@ -51,6 +51,10 @@ ExceptionDisableScreensaverPassword=105 try ( echo "Disable Screensaver" + # For current session + defaults -currentHost write com.apple.screensaver idleTime 0 || throw $ExceptionDisableScreensaver + + # For session after a reboot mkdir -p "$HOME/Library/LaunchAgents" || throw $ExceptionDisableScreensaver ( cat >"$HOME/Library/LaunchAgents/no-screensaver.plist" <"$HOME/Library/LaunchAgents/no-screensaver.plist" <