Tips for finding Knowledge Articles

  • - Enter just a few key words related to your question or problem
  • - Add Key words to refine your search as necessary
  • - Do not use punctuation
  • - Search is not case sensitive
  • - Avoid non-descriptive filler words like "how", "the", "what", etc.
  • - If you do not find what you are looking for the first time,reduce the number of key words you enter and try searching again.
  • - Minimum supported Internet Explorer version is IE9
Home  >
article

KB-2766: How to create a customised slideshow screensaver in OS X 10.8

Centrify Identity Service, Mac Edition ,  

12 April,16 at 11:07 AM

Applies to: All versions of Centrify DirectControl on Mac OS X 10.8 and above

Question:

Can a customised slideshow screensaver be created via Group Policy in OS X 10.8?

The way it works differs from earlier versions of OS X.


Answer:

Notes:
  • 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 scripts.
  • To set the screensaver to other default OS X screensavers, 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.



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:
  1. On a "template" Mac, open the System Preferences and configure the slideshow screensaver to the desired settings. 
     
  2. Open the Terminal and run the following (case-sensitive) commands:
    • defaults -currentHost read com.apple.screensaver moduleDict 
    • defaults -currentHost read com.apple.screensaver.iLifeSlideShows
    • defaults -currentHost read com.apple.ScreenSaverPhotoChooser
  3. These will return the properties of the currently configured slideshow.
    • For example, setting up the "Origami" slideshow to use the OS X's default "Desktop Pictures" folder as its source will return the following results:
       
    • $ defaults -currentHost read com.apple.screensaver moduleDict 
    • {
    •     moduleName = iLifeSlideshows;
    •     path = "/System/Library/Frameworks/ScreenSaver.framework/Resources/iLifeSlideshows.saver";
    •     type = 0;
    • }
       
    • $ defaults -currentHost read com.apple.screensaver.iLifeSlideShows
    • {
    •     styleKey = Origami;
    • }
       
    • $ defaults -currentHost read com.apple.ScreenSaverPhotoChooser
    • {
    •     CustomFolderDict =     {
    •         identifier = "/Library/Desktop Pictures";
    •         name = "Desktop Pictures";
    •     };
    •     LastViewedPhotoPath = "";
    •     SelectedFolderPath = "/Library/Desktop Pictures";
    •     SelectedSource = 4;
    • }
  4. The returned values can then be noted down and be used to set the slideshow screensaver from the command-line: (These commands can also be run from a login script)
    • defaults -currentHost write com.apple.screensaver moduleDict -dict moduleName "iLifeSlideshows" path "/System/Library/Frameworks/ScreenSaver.framework/Resources/iLifeSlideshows.saver" type "0"
       
    • defaults -currentHost write com.apple.screensaver.iLifeSlideShows styleKey "Origami"
       
    • defaults -currentHost write com.apple.screensaver.ScreenSaverPhotoChooser CustomFolderDict -dict identifier "/Library/Desktop Pictures" name "Desktop Pictures"
       
    • defaults -currentHost write com.apple.screensaver.ScreenSaverPhotoChooser SelectedFolderPath "/Library/Desktop Pictures"
       
    • defaults -currentHost write com.apple.screensaver.ScreenSaverPhotoChooser SelectedSource "4"
  5. (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\

        User-added image
  6. 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_slideshow_screensaver.sh
      • The "Parameters" field can be left blank.

        User-added image
         
  7. To allow the GP to take affect immediately, go to the Mac, open up Terminal and run the command:
    • adgpupdate
  8. Logout and log back in as another AD user, look in the System Preferences to make sure the screensaver is now selected.
    • (The commands from Step 2 could also be run as a confirmation that the settings have been applied)

 
Attachments:

Still have questions? Click here to log a technical support case, or collaborate with your peers in Centrify's Online Community.