07-14-2021 06:50 PM - edited 07-16-2021 09:13 AM
Hi Community,
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!
Posted on 07-14-2021 07:23 PM
Great Work Flow Thanks! 😀
Posted on 07-15-2021 05:23 AM
Thank you for sharing this.
01-14-2022 12:07 PM - edited 01-17-2022 06:57 AM
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.
01-26-2022 06:58 AM - edited 01-26-2022 08:57 AM
@jseckler-adi Thanks for sharing, it's also a clever way to add value for users to choose specific images as background desktop (or other usage) through simple policy call.
Posted on 03-28-2023 05:33 PM
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'?
Thanks.
Posted on 04-04-2023 06:24 AM
Hi Janzaldua
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.
Posted on 04-04-2023 03:58 PM
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.
Posted on 04-05-2023 06:05 AM
Try this @janzaldua
#!/bin/bash
# Add Desktop Wallpapers to System Preferences
rm ~/Library/Preferences/com.apple.systempreferences.plist
killall -hup cfprefsd
sleep 3
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
Posted on 10-05-2023 09:12 AM
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.
Posted on 10-05-2023 10:46 AM
I can't really tell you as I am using the same process and it works great with Sonoma. Is your Process run well on Ventura for instance? Any additional log or errors to build on?
Posted on 10-05-2023 11:03 AM
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.
Posted on 10-13-2023 07:17 AM
Figured it out. it was down to how i was adding the /shared folder in composer. Thanks for this post.
Posted on 11-28-2023 06:29 AM
Can you make a small video clip on how to do this? Still a little confused.
Posted on 11-29-2023 08:46 AM
I unfortunately won't have the time to record the whole process. However, can I help you find out what's confuses you?
Posted on 03-12-2024 12:22 PM
This seems overly complicated to me. A package that adds the image to the \users\shared folder and a single line of code is working great for us(thanks chatGPT). Set the policy to run once per user per computer and there you go! Here is the sample code:
osascript -e 'tell application "Finder" to set desktop picture to POSIX file "/Users/Shared/your_wallpaper.jpg"'
Posted on 03-18-2024 01:28 AM
Hi everyone!
Do I need an apple developer account to be able to sign the package?
Posted on 03-18-2024 01:36 AM
clarification - I want to automatically install the background image without user interaction.
Posted on 03-18-2024 05:57 AM
Hello Pomeroy21
Hi Pomeroy21
You can use Jamf built-in CA to sign your package if you do not have a Dev Apple account.
Posted on 03-18-2024 06:17 AM
Hi Karl941!
I've been struggling all morning to get it to work using the guide. I've tried deploying policies and profiles. I still can't get it to work and the test computer keeps asking for permission to install the background. Certificate downloaded from jamf, uploaded to keychain. Still can't get it to work...
Posted on 03-19-2024 01:42 AM
I managed to get it fixed today! Not sure what I did wrong but it works! Thanks!
Posted on 05-13-2024 12:55 PM
Stumbled upon this today when trying to find a way to set background on enrollment but allow users to change it when they want to.
Thank you for this!
Posted on 05-17-2024 10:21 AM
Worked perfectly on macOS 14.5!
Posted on 05-17-2024 11:04 AM
I am glad to still see this alternative working :)
a month ago
@Karl941
Thanks for the steps here! I have the automator app working and have a JAMF Policy ready for set up but,
I am fairly new to Composer. I installed it on my machine and running it through Terminal as the documentation and guides show but your steps makes it seem there is a GUI for it that i am not seeing.
Am i missing a step or do i need to read up on the composer commands to get through the rest of steps 7-12
Any help is appreciated !
3 weeks ago
Hi IrvinAlo,
Since you can add your Automator.app and a post script inside your PKG, you are fine to use any of your favorite packager app.
It might be worth to check Composer documentation as I am not familiar about the CLI you used to run it.