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-2756: How to set a Mac Desktop Background via Group Policy

Centrify Identity Service, Mac Edition ,  

18 October,16 at 12:57 PM

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

Answer:
 
This can be achieved by using a combination of the "Copy File" GP and a simple login script:
 
Note:
  • 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++: http://notepad-plus-plus.org)

     
    - Change the filename variable to the background picture being copied over and save the script to the following folder on the AD server:
     
      \\[domain]\SYSVOL\[domain]\scripts\
     
     
     
     
     
     
     
     
     
     
     
     
     
  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: set_wallpaper.sh
    - 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:
     
      adgpupdate
     
  6. Logout and login as an AD user to see the new wallpaper.
 
 
Notes:
  • 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\""
Attachments:

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