Applies to: All versions of Centrify DirectControl on Mac OS X 10.6 and above.
Is there a way to specify which screensaver to use on Mac systems via group policy?
- The scripting hints provided in this KB are provided as a proof-of-concept only.
- Centrify Support does not cover custom-scripting - please contact Centrify Professional Services for further assistance with custom scripts.
- To set the screensaver to a specific slideshow screensaver (for OS X 10.8 and later), please see the following KB:
- This workaround does NOT prevent the user from changing the screensaver while they are logged in, but any changes will be reset back to the GP values once the command is run again at the next login.
- If the Screensaver Preferences need to be locked out altogether, then the following GPs can be used:
- User Configuration / Centrify Settings / Mac OS X Settings / System Preferences Settings /
- Remember that these commands will only apply if the screensaver is already installed on the Mac.
There is no specific group policy to select a specific screensaver since different versions of OS X may come with different screensavers loaded (in addition to user-installed screensavers).
However if it is definitely known that a desired screensaver is already installed on the target Mac systems, then the following steps can be used to make sure it is enabled at each login:
- On a "template" Mac, open the System Preferences and enable the desired screensaver.
- Open the Terminal and run the command:
- defaults -currentHost read com.apple.screensaver moduleDict
- This will return the properties of the currently selected screensaver.
- For example if the "Flurry" screensaver is selected, then the output will be:
- $ defaults -currentHost read com.apple.screensaver moduleDict
- moduleName = Flurry;
- path = "/System/Library/Screen Savers/Flurry.saver";
- type = 0;
- The returned values can then be noted down and be used to set the screensaver from the command-line:
- defaults -currentHost write com.apple.screensaver moduleDict -dict moduleName "Flurry" path "/System/Library/Screen Savers/Flurry.saver" type "0"
- (Optional - please see the Notes disclaimer above)
- Open the attached login script for editing. (Don't use Windows Notepad, use a UNIX-capable text editor instead, such as Notepad++)
- Change the variables to match the values from Step 3 above.
- Save the script to the following folder on the AD server:
- \\ [domain] \SYSVOL\ [domain] \scripts\
- Enable the GP at:
- User Configuration / Centrify Settings / Mac OS X Settings / Scripts / "Specify multiple login scripts"
- Enter the filename of the script only: set_screensaver.sh
- The "Parameters" field can be left blank.
- To allow the GP to take affect immediately, go to the Mac, open up Terminal and run the command:
- Logout and log back in as another AD user, look in the System Preferences to make sure the screensaver is now selected.
- (The command from Step 2 could also be run as a confirmation that the settings have been applied)