5

I have my screen saver set to display images from a folder in my ~/Pictures directory, and the "Shuffle slide order" box is checked. In Yosemite, I find that occasionally one or both of those settings will revert to the defaults; the "Source" menu will revert to "National Geographic", the "Shuffle slide order" box will be unchecked, or both.

Is there any reason these settings should be changing without my intervention? Is there any way I can monitor the settings (such as in a system log somewhere) to find out more about when this happens and why? Is there a default write command I can execute to make my desired settings the default?

2

(Answering my own question)

This problem never went away for me, but I do have a workaround. I found the preferences that kept changing were in com.apple.ScreenSaverPhotoChooser. I set everything the way I wanted it in System Preferences, then read all the values from that preference file with

defaults -currentHost read com.apple.ScreenSaverPhotoChooser

I then copied all those values into a script that would write them back to the same preference file whenever it spontaneously changed its values.

#!/bin/bash
defaults -currentHost write com.apple.ScreenSaverPhotoChooser CustomFolderDict -dict identifier \"/Users/me/Pictures/MyFolder\" name MyFolder
defaults -currentHost write com.apple.ScreenSaverPhotoChooser SelectedFolderPath \"/Users/me/Pictures/MyFolder\"
defaults -currentHost write com.apple.ScreenSaverPhotoChooser SelectedSource -int 4
defaults -currentHost write com.apple.ScreenSaverPhotoChooser ShufflesPhotos -bool true

(I may be able to combine all those lines into one line; I am not sure about that and haven't tried it.)

I saved the script as ~/bin/screen-saver-prefs and made it executable. Whenever I happen to notice that my screen saver is not doing what I want, I just open up a terminal and run screen-saver-prefs at the prompt. ~/bin is on my PATH, so I don't need to reference the directory. If you don't want to do that, just use the full path to the script to run it.

It's not the most elegant or efficient solution, but it works.

  • 1
    I love that your returned to answer your question! This worked for me, my one addition was rather than deal with Bash paths I put the script in a regular folder, renamed .sh to .command and made it executable. That way I can double click to run it. – John Faughnan Jul 15 '15 at 18:52
1

Is your machine a member of an Active Directory domain with a group policy set to have the screensaver work in a certain way?

Where I work they have policies for such things, as well as proxy settings that break Yosemite. It may be (if you are similarly tied to Active Directory) that you could have something similar going on.

  • No, nothing is set by Active Directory. – Flavin Dec 8 '14 at 19:36
1

I upgraded to 10.10.2 and I thought the problem had been fixed but it hasn't. This is what I have found out which sheds some light but I don't know how to fix it.

In the ~/Library/Preferences/ByHost Folder there is the screen saver files. The one in question I see is this one:

com.apple.ScreenSaverPhotoChooser.3894DB94-8127-583F-A292-E5634E257DF3.plist

After setting my screensaver information properly. the XML file contains this: <plist version="1.0"> <dict> <key>LastViewedPhotoPath</key> <string></string> <key>SelectedMediaGroup</key> <string>2CE52ED9-1E40-4569-816A-1B5A446FC00F</string> <key>SelectedSource</key> <integer>1</integer> <key>ShufflesPhotos</key> <true/> </dict> </plist>

After the screensaver is run, it looks like this:

<plist version="1.0"> <dict> <key>LastViewedPhotoPath</key> <string>/path/to/last/image/(my proper image that it was viewing)</string> <key>SelectedSource</key> <integer>1</integer> <key>ShufflesPhotos</key> <true/> </dict> </plist>

After running it again, it turned to this. <plist version="1.0"> <dict> <key>LastViewedPhotoPath</key> <string>/Library/Screen Savers/Default Collections/1-National Geographic/NatGeo03.jpg</string> <key>SelectedFolderPath</key> <string>/Library/Screen Savers/Default Collections/1-National Geographic</string> <key>SelectedSource</key> <integer>3</integer> <key>ShufflesPhotos</key> <true/> </dict> </plist>

Unfortunately, even if I copy the original plist back into the folder, the settings don't revert. But Obviously, I'm seeing the "SelectedMediaGroup" is missing after the screensaver runs once. and then it doesn't know what to do so it reverts to National Geographic as the default.

0
+50

How often does it revert, once an hour? Once a week? Could there be a corrupt photo, or non-photo file in the folder? Maybe try and simplify the folder with just a couple photos, see if it still reverts, and slowly add a few more pics over the course of a few days and see if it continues.

You could also try and move the com.apple.screensaver.plist file, located in ~/Library/Preferences/, to the desktop, reboot, and reapply your desired screensaver settings. This often helps with odd issues like you are describing.

  • Deleting com.apple.screensaver.plist only removed the requirement that I use a password on screen lock. In retrospect, I should have read the file before removing it... – Flavin Dec 9 '14 at 19:43
  • The problem has not recurred in several days. If it does happen again, I'll look at and potentially remove one of the various screensaver-related plist files in ~/Library. – Flavin Dec 9 '14 at 19:44
  • Of course, immediately after that last comment the settings reverted. – Flavin Dec 9 '14 at 19:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .