Posted on 03-23-2015 04:34 PM
It seems screensaver settings are now contained within the ByHost files.
I have tried several scripts with mixed results and was wondering if anyone has had any luck with deploying a screensaver for an enterprise
What I am trying to achieve is point the screensaver to a folder with corporate pictures in it and change to the 'Classic' style.
Posted on 03-23-2015 09:56 PM
here it is in perl...as a log in script LaunchAgent that runs as the user logs in. we only set it once, could enforce it every login by getting rid of the unless test.
#!/usr/bin/perl -w
my $ss = $HOME . "/.screensaverset";
unless(-e $ss) {
syslog('notice', "Setting default ScreenSaver");
system("defaults -currentHost write com.apple.screensaver moduleDict -dict moduleName "iLifeSlideshow" path "/System/Library/Frameworks/ScreenSaver.framework/Resources/iLifeSlideshows.saver" type 0");
system("defaults -currentHost write com.apple.ScreenSaverPhotoChooser LastViewedPhotoPath """);
system("defaults -currentHost write com.apple.ScreenSaverPhotoChooser SelectedFolderPath "/Library/Screen Savers/Default Collections/GreenSaver"");
system("defaults -currentHost write com.apple.ScreenSaverPhotoChooser SelectedSource -int 3");
system("defaults -currentHost write com.apple.ScreenSaverPhotoChooser ShufflesPhotos -bool false");
system("defaults -currentHost write com.apple.ScreenSaver.iLifeSlideShows styleKey KenBurns");
system("touch "$ss"");
}
Posted on 03-24-2015 12:37 PM
Posted on 03-24-2015 01:43 PM
@Araneta I never could figure out how to make a saver to deploy it. but since it was just a bunch of pictures this was just as good.
set it the way you want it then read the files
defaults -currentHost read com.apple.screensaver
and see if any other files have been updated since you made your changes and see if they need changes made to them.
start with a clean account its easier to find stuff.
Posted on 03-24-2015 05:53 PM
Thanks @nessts , I just tried Composer and it worked for me. I just need to make sure to copy the contents to ~/library/Screen Saver and save it as dmg. :)
Posted on 05-13-2015 12:59 PM
@nessts I know this is a couple months old, but I'm trying to do pretty much the same thing as your script, but whenever I run it, the stylekey never changes. While the .plist will say the desired stylekey (In this case, Flipup), when I activate the screensaver, it's still at whatever it was set to previously directly through System Preferences.
I can't for the life of me figure out where it's storing this information.
Any suggestions?
(https://jamfnation.jamfsoftware.com/discussion.html?id=14453)
Posted on 05-13-2015 07:50 PM
try adding a killall cfprefsd at the end of your script perhaps?
Posted on 05-14-2015 10:35 AM
@nessts You sir, are a bucking genius. That was it. While System Preferences still shows the previously selected screen saver, the correct screensaver actually shows up, which is all I really care about. This has been driving me nuts in one way or another for months.
Thank you a dozen times over. ^^