Provision macOS disable screensaver in current session

Task-number: QTQAINFRA-1244
Change-Id: I3a27d8cdee8cd7b22d86116d58009e952ab536ea
Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Tony Sarajärvi
2017-05-30 12:35:19 +03:00
parent 5be9b3d2be
commit ba1a8d6216
2 changed files with 8 additions and 0 deletions

View File

@@ -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" <<EOT

View File

@@ -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" <<EOT