I am just sharing here another way of deploying silently a new Desktop Background to Mac computers without using Script install, Desktoppr or a Configuration Profile. This workflow is compatible from Catalina to Monterey Beta.
Create your Jamf Policy to deploy it
#!/bin/bash open /Users/Shared/Your_Automator.app sleep 10 rm -R /Users/Shared/Your_Automator.app rm -rf /Users/Shared/Your_Image.png
Hope it may be useful!
This is great! Instead of doing 1 image, I did an entire folder, full of images I wanted to cycle through. This actually works as well.
Wanted to make a quick edit to describe my final results.
I made a folder here /Library/Desktop Pictures/My Images, then created sub folders, /Library/Desktop Pictures/My Images/Image1, etc. I created an automator app as well as placed my image source file into image 1. I repeated this process for each desktop that I wanted to have.
For instance, I have Image1-12, each with a desktop background with its own automator app. Placed the entire folder "My Images" into composer, and gave them all 757 permissions.
Uploaded the package to jamf, create a "source" policy that drops the images and apps onto the users mac into that location, then made 12 separate policies for each background then assigned to a category in jamf called "Desktop Wallpaper".
The polices are just files and processes: open "/Library/Desktop Pictures/My Images/Image1/Image1.app" under execute command. Set to an ongoing policy, available in Self Service, under its own category Desktop Wallpaper. I uploaded icons for each policy, so the user gets a preview of what the desktop will look like, before even setting it. Renamed the run actions to "Set" and "Reset" when running the policy in Self Service.
Hello this works great, but I have a slight problem. If I have my MacBook connected to a docking station with multiple monitors (which many users do), the background only gets deployed to a single monitor (not both).
And a follow question. Will this still work if the Main drive is named something other than 'Macintosh HD'? Such as 'untitled' or 'Mac HD'?
I unfortunately haven't found a way to deploy it to both. In my environment, the wallpapers are available through the self service and to target the proper display, the SS app must be placed on the targeted screen you want to apply the image.
The script commands are targeting the user environment so it does not matter the name of the local HD drive.
Thanks for the reply Karl! This would have worked perfect if it was able to deploy to both/all available monitors/desktops. Another nice feature would be adding the photo to the wallpaper library, so it shows up as an option to click.
Try this @janzaldua
# Add Desktop Wallpapers to System Preferences
killall -hup cfprefsd
defaults write /Library/Preferences/com.apple.systempreferences DSKDesktopPrefPane '<dict><key>UserFolderPaths</key><array><string>YOUR_PATH_TO_FOLDER_IMAGE_HERE</string></array></dict>'
defaults write ~/Library/Preferences/com.apple.systempreferences DSKDesktopPrefPane '<dict><key>UserFolderPaths</key><array><string>YOUR_PATH_TO_FOLDER_IMAGE_HERE</string></array></dict>'
killall -hup cfprefsd
I am trying this exact process but it appears to not work with Sonoma at all. I received an error that it is not compatible with this version of macos. Any guidance on this would be great. I'm tasked with pushing out an updated wallpaper to all our macs.
I have to do a little bit more research. The issue is somewhere after creating the pkg. If I run the app, it runs fine and sets the wallpaper correctly. It's after the package gets created that this failure happens. I'm working on it now. Fingers crossed.