In earlier versions of macOS, I was able to set the screensaver from a shell script using a command like this:
defaults -currentHost write com.apple.screensaver moduleDict -dict moduleName Drift path /System/Library/Screen\ Savers/Drift.saver type 0
In 10.14, however, it seems like while the system still writes to that property, setting the property no longer controls the screensaver. You can read the property via
defaults -currentHost read com.apple.screensaver
But setting it doesn’t change the selected screensaver.
How can I programmatically control which screensaver is selected in macOS 10.14 Sonoma?