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  >

KB-2756: How to set a Mac Desktop Background via Group Policy

Mac & PC Management Service ,  

24 September,20 at 07:45 PM

Applies to: DirectControl 4.2 & higher on Mac OS X
How can the desktop background or wallpaper on a Mac be configured via Group Policy?

This can be achieved by using a combination of the "Copy File" GP and a simple login script:
  • 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.
  1. Copy the desired background picture to the AD server's \\[domain]\SYSVOL\[domain]\ folder, or to an accessible network share.

  2. Set up the Copy File GP at: 
    Computer Configuration / Centrify Settings / Common UNIX Settings / "Copy files"
    - Browse to the background picture and configure the destination to: /Library/Desktop Pictures/
    - Make sure "Copy as binary file" is enabled.

  3. Open the attached login script for editing.
    (Don't use Windows Notepad, use a UNIX-capable text editor instead, such as Notepad++:

    - Change the filename variable to the background picture being copied over and save the script to the following folder on the AD server:
  4. Set up the Login Script GP at: 
    User Configuration / Centrify Settings / Mac OS X Settings / Scripts / "Specify multiple login scripts"
    - Enter the filename of the script only:
    - There is no need to enter anything in "Parameters".
    User-added image
  5. To allow the GP to take affect immediately, go to the Mac, open up Terminal and run the command:
  6. Logout and login as an AD user to see the new wallpaper.
  • For reference, the command that the login script uses to change the background is:
    • osascript -e "tell application \"System Events\" to set picture of every desktop to \"/Library/Desktop Pictures/$WALLPAPER_FILENAME\""