Posted on 01-04-2023 01:04 AM
Hi everyone!
I've been spending so much time on this so I hope to find an answer in the Jamf community.
Was anyone able to find a way to set a custom screensaver (a folder with 3 pictures in a loop) that works with macOS Ventura?
I've got close to have it working with the below script, but I still need to manually go into System Settings - Screen Saver and choose "Classic", because it defaults to Ventura and I cannot find a way to fix this.
Any help would be extremely appreciated!
#!/bin/sh
## get current user
user=$( echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ { print $3 }' )
## configure screensaver framework
/usr/bin/sudo -u "$user" /usr/bin/defaults -currentHost write com.apple.screensaver moduleDict -dict moduleName -string "iLifeSlideshows" path -string "/System/Library/Frameworks/ScreenSaver.framework/PlugIns/iLifeSlideshows.appex" type -int 0
## set key items for screensaver
/usr/bin/sudo -u "$user" /usr/bin/defaults -currentHost write com.apple.screensaver CleanExit -string "YES"
/usr/bin/sudo -u "$user" /usr/bin/defaults -currentHost write com.apple.screensaver PrefsVersion -int 100
/usr/bin/sudo -u "$user" /usr/bin/defaults -currentHost write com.apple.screensaver showClock -string "YES"
/usr/bin/sudo -u "$user" /usr/bin/defaults -currentHost write com.apple.ScreenSaverPhotoChooser CustomFolderDict -dict identifier "/Users/Shared/ScreenSavers/" name "ScreenSavers"
/usr/bin/sudo -u "$user" /usr/bin/defaults -currentHost write com.apple.ScreenSaverPhotoChooser SelectedFolderPath -string "/Users/Shared/ScreenSavers/"
/usr/bin/sudo -u "$user" /usr/bin/defaults -currentHost write com.apple.ScreenSaverPhotoChooser SelectedSource -int 4
/usr/bin/sudo -u "$user" /usr/bin/defaults -currentHost write com.apple.ScreenSaverPhotoChooser ShufflesPhotos -bool "true"
/usr/bin/sudo -u "$user" /usr/bin/defaults -currentHost write com.apple.ScreenSaver.iLifeSlideShows styleKey -string "Classic"
/usr/bin/sudo /usr/bin/killall -hup cfprefsd
exit 0
Posted on 05-16-2023 06:55 AM
I'm having the same issue, have you fixed this yet?
Posted on 05-16-2023 07:41 AM
@Abd0192 the script that I posted in the original message ended up working for me in the end, but for some weird reason it doesn't work if you go into System Settings > Screen Saver and make any change before the policy with that script runs.
My suggestion is create a policy with the script, push it on a device, don't make any manual change but just wait until the screensaver starts.
Posted on 05-16-2023 07:56 AM
I've just used your script and it worked. Thank you :)
Posted on 10-05-2023 02:57 PM
I think Sonoma broke this. :(
has anyone else tested this yet?
Posted on 10-19-2023 12:31 AM
I just tested this, and unfortunately it's no longer working for me either with macOS Sonoma.
Back to square one! :(
Posted on 10-19-2023 12:35 AM
@Manu_ssi Flipping Apple *_*