OSX Different backgrounds for different departments [and other settings]

CCNapier
Contributor

I can set the background image in :
Configuration Profiles > Restrictions > Functionality > Desktop picture path

However, a whole load of other Restrictions are also set "as default".
Naturally, I already have another "Global" Configuration Profile that has various restrictions set.

I've read threads on here saying "most restrictive settings win", but I've also read form Apple that "conflicting Configuration Profiles have undocumented effects". As far as I can tell there is no definitive answer on what will consistently happen with two opposing settings.

This seems to suggest that I have to duplicate all the other settings across different Configuration Profiles for different departments. If I want to make a "global" change for all departments, I would have to go into each Configuration Profile to update them all. If the only difference (for now) is the background image, this seems like overkill!

I understand that some others think this is a flaw, but I wanted to be sure - this is really the way we have to do it? Or is the info I have a little dated now?

3 REPLIES 3

m_donovan
Contributor III

I have seen issues where multiple config profiles with conflicting payloads have caused problems. A work around for this same issue that I used to have different desktop images on different grade level devices was to have a single named file. I would name the background image the same for all devices (i.e moutainviewbackground.png). This image was dropped into a specific file location using a composer package and policy or ARD (i.e. /Library/Application Support/JAMF/bin). My config profile was then pointed at that folder and file for the desktop image. So if I wanted to change the background image I just pushed out a different package to replace the current image for that device.

apizz
Valued Contributor

@CCNapier We ran into the dual-config profile setting problem and ultimately had to merge them. Very annoying when you only want to apply or change an individual preference.

The problem we've also run into with applying Desktop backgrounds via Config Profile is that regardless of checking the "lock" checkbox it doesn't appear users can manually change this once applied. This is good for our student machines (we're a school), but not so great for our Faculty.

To get around this we've implemented a script that changes the Desktop background to our desired default. We use [outset](link URL) for this purpose to ensure the script to set the Desktop background is applied only once when the user logs in. I've not had consistent results with policies running at login through jamf for whatever reason.

This might work for you, as if you use a generic image name for your Desktop background, when a change is needed you could package up a new image file that overrides the existing image and setup a policy to install that and rerun your local Desktop config script to apply the new image.

You could also go so far as to create a Self Service policy to have your users do this yourself.

Below is the script we use.

#!/bin/bash

WALLPAPER="/path/to/DesktopBackground.jpg"
USER=$(/bin/ls -l /dev/console | /usr/bin/awk '{print $3}')
LOG="/path/to/log.log"

writelog() {
    /bin/echo "${1}"
    /bin/echo $(date) "${1}" >> "$LOG"
}

writelog "---------- START ----------"

if [ -f $WALLPAPER ]; then
    writelog "Wallpaper: Found. Setting wallpaper for ${USER} ..."

    /usr/bin/osascript -e 'tell application "System Events" to set picture of every desktop to ("/path/to/DesktopBackground.jpg" as POSIX file as alias)'

    if [ $? = 0 ];then
        writelog "Wallpaper: Successfully changed for ${USER}!"
    else
        writelog "Wallpaper: Failed to be changed for ${USER}."
    fi
else
    writelog "Wallpaper: Not Found. Exiting script ..."
    exit 1
fi

writelog "---------- DONE ----------"

exit

CCNapier
Contributor

Yep, seems like it's an "issue" then. By design as it seems? :(
Thanks for posting the script. I think that maybe it's just easier overall to have two separate profiles that duplicate everything except the small difference required (wallpaper). This manageable with just two profiles, but if that grows (as our estate grows), the script is likely more preferable.

I like to have things grouped in a single place if I can!

Thanks for the responses.