Hey all,
Noticed there are a couple threads on here about setting screensavers. Below is a screenshot after running the script. I have not had much luck with 10.11.4 and the following script:
#!/bin/sh
#copy VVHSS folder to /Library/ScreenSavers
echo "Mounting Share...."
protocol="smb" # This is the protocol to connect with (afp | smb)
echo "Protocol: $protocol"
serverName="SERVERNAME" # This is the address of the server, e.g. my.fileserver.com
echo "Server: $serverName"
shareName="Shares" # This is the name of the share to mount
echo "Sharename: $shareName"
# Mount the drive
mount_script=`/usr/bin/osascript > /dev/null << EOT
tell application "Finder"
activate
mount volume "$protocol://${serverName}/${shareName}"
end tell
EOT`
#copy files
echo "Copying Files...."
rm -r /Library/Screen Savers/VVHSS
cp -r /Volumes/Shares/SSaver /Library/Screen Savers/VVHSS
## Set Screensaver to Photo Slideshow
/usr/bin/defaults -currentHost write com.apple.screensaver 'CleanExit' -string "YES"
/usr/bin/defaults -currentHost write com.apple.screensaver 'PrefsVersion' -int "100"
/usr/bin/defaults -currentHost write com.apple.screensaver 'idleTime' -int "150"
/usr/bin/defaults -currentHost write com.apple.screensaver "moduleDict" -dict-add "path" -string "/System/Library/Frameworks/ScreenSaver.framework/Resources/iLifeSlideshows.saver"
/usr/bin/defaults -currentHost write com.apple.screensaver "moduleDict" -dict-add "type" -int "0"
/usr/bin/defaults -currentHost write com.apple.screensaver 'ShowClock' -bool "true"
/usr/bin/defaults -currentHost write com.apple.screensaver 'tokenRemovalAction' -int "0"
## Set Type of Slideshow to "Flipup" (Results inconsistent)
/usr/bin/defaults -currentHost write com.apple.ScreenSaver.iLifeSlideshows 'styleKey' -string "Flipup"
## Set location of photos to Fan Art
/usr/bin/defaults -currentHost write com.apple.ScreenSaverPhotoChooser 'SelectedSource' -int "4"
/usr/bin/defaults -currentHost write com.apple.ScreenSaverPhotoChooser 'SelectedFolderPath' "/Library/Screen Savers/VVHSS"
/usr/bin/defaults -currentHost write com.apple.ScreenSaverPhotoChooser 'ShufflesPhotos' -bool "false"
## Removes the .plist LaunchAgent from inside the User Launch Agent Folder.
rm -f ~/Library/LaunchAgents/set-screensaver.plist
#apply instantly - Kills settings panel
killall cfprefsd
#allow all users access to VVHSS Folder
chmod -R 0777 /Library/Screen Savers/VVHSS
echo "Script Completed....."