Provisioning: disable screensaver password

Previously provisioning disabled screensaver on startup
but didn't affect current session. Thus the screensaver
hits the VMs while provisioning and without this commit
the screen gets locked. This prevents the lock and
we get to the desktop on the VMs.

Change-Id: Icd783127e898ece6bebb5598ab86f12d5062eeb5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Tony Sarajärvi
2017-05-03 09:54:56 +03:00
parent 933688fc39
commit 7937eb2d9e
2 changed files with 14 additions and 0 deletions

View File

@@ -46,6 +46,7 @@ ExceptionSetInitialDelay=101
ExceptionSetDelay=102
ExceptionVNC=103
ExceptionNTS=104
ExceptionDisableScreensaverPassword=105
try
(
@@ -78,6 +79,8 @@ try
EOT
) || throw $ExceptionDisableScreensaver
defaults write com.apple.screensaver askForPassword -int 0 || throw $ExceptionDisableScreensaverPassword
echo "Set keyboard type rates and delays"
# normal minimum is 15 (225 ms)
defaults write -g InitialKeyRepeat -int 15 || throw $ExceptionSetInitialDelay
@@ -113,5 +116,9 @@ catch || {
echo "Failed to set NTS."
exit 1;
;;
$ExceptionDisableScreensaverPassword)
echo "Failed to disable requiring of password after screensaver is enabled."
exit 1;
;;
esac
}

View File

@@ -46,6 +46,7 @@ ExceptionSetInitialDelay=101
ExceptionSetDelay=102
ExceptionVNC=103
ExceptionNTS=104
ExceptionDisableScreensaverPassword=105
try
(
@@ -78,6 +79,8 @@ try
EOT
) || throw $ExceptionDisableScreensaver
defaults write com.apple.screensaver askForPassword -int 0 || throw $ExceptionDisableScreensaverPassword
echo "Set keyboard type rates and delays"
# normal minimum is 15 (225 ms)
defaults write -g InitialKeyRepeat -int 15 || throw $ExceptionSetInitialDelay
@@ -113,6 +116,10 @@ catch || {
echo "Failed to set NTS."
exit 1;
;;
$ExceptionDisableScreensaverPassword)
echo "Failed to disable requiring of password after screensaver is enabled."
exit 1;
;;
esac
}