Managed Prefs for Screensaver - issue with setting idle time

Bartoo
New Contributor III

We have a custom screensaver- we also have a need for it to come on after 10 minutes and lock.

What does work:
we set the following-
com.apple.screensaver-
• Require Password : set to "1"
• Screen Saver Module Path to: System/Library/Screen Savers/myscreensaver.saver

com.apple.screensaver.ByHost:
• Require Password : set to "1"
• Screen Saver Module Path to System/Library/Screen Savers/myscreensaver.saver
• Screen Saver Module: Value is set to MyScreensaver

These work as expected - however, for both we set for Idle Time the value to 600 (10 mins)

When we add an otherwise unmanaged machine to the screen saver managed pref group, the run sudo jamf mcx -verbose we get:

Parsing MCX Data... verbose: Found Setting: "My Screen Saver Module Path" verbose: Found Setting: "My Screen Saver Idle Time"

Applying Managed Preferences... verbose: Importing setting "My Screen Saver Module Path"... verbose: Importing setting "My Screen Saver Idle Time"... verbose: Importing setting "Enable External Accounts"... verbose: MCXSettings: <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict> <key>mcx_application_data</key> <dict> <key>com.apple.loginwindow</key> <dict> <key>Forced</key> <array> <dict> <key>mcx_preference_settings</key> <dict> <key>EnableExternalAccounts</key> <false/> </dict> </dict> </array> </dict> <key>com.apple.screensaver</key> <dict> <key>Forced</key> <array> <dict> <key>mcx_preference_settings</key> <dict> <key>loginWindowIdleTime</key> <integer>600</integer> <key>loginWindowModulePath</key> <string>/System/Library/Screen Savers/mcomss.saverr</string> </dict> </dict> </array> </dict> </dict>
</dict>
</plist>

That looks ok, the custom screensaver is now default and does require you to use your password to unlock once it starts.

But the idle time always remains the default 20 mins.

Any help would be appreciated!

11 REPLIES 11

nessts
Valued Contributor II

i think i got around this by managing screen sleep time in the power settings, to the 10 minutes you want, but then it really makes a screensaver almost useless. unless somebody bumps the mouse

jarednichols
Honored Contributor

I set my screensaver by MCX.

com.apple.screensaver
System Level Enforced
key: idleTime
value: 900 (integer)

Never had an issue with it.

colonelpanic
Contributor

I just had the same issue and it was fixed by setting it to 10 minutes instead of 15. The options available do not include 15 minutes so it looks like it was rounding up to 20.

mm2270
Legendary Contributor III

Yeah I think I recall reading when ML came out that Apple actually changed the screen saver controls so that only certain increments work now. You can't set it to something like 12 minutes, etc. Makes sense, why actually give us an option to set it to what we want? Father Apple knows what we actually want better than we do :rollseyes:

tkimpton
Valued Contributor II

I change the defaults from here

/System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/EngineDefaults.plist

yellow
Contributor

Interesting.. I am getting really frustrated that the 20 minute default is coming back again and again no matter what I set it to in MCX.. and I think tkimpton solved where the F(#@! this kept coming from! Thanks person!!

Treger
Contributor

Ignore that, I have actually found that it is the by Host screensaver.plist that controls this, I have now grabbed it and manipulated it to what I wanted and used Tim Sutton mcxToProfile to turn it into a Configuration Profile and voila, Yosemite is now sorted on a 15 min timer, it still shows as 20 mins in the prefs but I have timed it and it locks out in 15 mins.

bbot
Contributor

@Treger Would you be so kind to show me how you did this or can send me the configuration profile so I can review it?

Treger
Contributor

Hi @brandobot, ok, what I did was find the plist file for the screensaver in your ~/Library/preferences/com.apple.screensaver.plist modify this either manually with a text editor or with Xcode to the settings that you want and then copy it to the desktop, then go here https://github.com/timsutton/mcxToProfile follow the instructions to convert the plist on the desktop to a config and then upload to Casper. NB, even when you do this, the 20 mins still shows up as what the screensaver is set to but on mine the lockout happens as the time you specify in the plist, at least that is how it is working for me...

bbot
Contributor

Thanks @Treger !

dgreening
Valued Contributor II

Yeah, it does seem like if you set the screensaver time to a value which is not an option in the GUI, the GUI wont show the time frame which you set it to, but the system does in fact respect what you set it to.