Setting Desktop Wallpaper on MacBooks

IPASupport
New Contributor

Aloha Everyone!

Account type: Jamf School

Not sure if this is the proper place to ask, but I've been working on deploying a custom wallpaper to all of our student MacBooks for a few months now and am hitting a wall. Our previous rep, Christina was looking into this, but all we could find was a solution for Jamf Pro. 

I've tried the following:

  • Setting a path and inputting it into a Jamf School Profile
  • Using composer to create a DMG to upload to Jamf School but the file is not supported
  • Using composer to package the image file and deploying through Jamf School - still no luck
  • Script to push out the image file and still no luck (would reset the desktop picture with a stock image)

Current environment: Student Restrictions Profile is installed on all MacBooks where they cannot change the Desktop picture. However, this was not in place for years until I deployed it recently. We want to reset all of the wallpapers before the end of the school year, if possible. 

If anyone has a solution, I would appreciate it! 

10 REPLIES 10

AJPinto
Esteemed Contributor

I have not use Jamf School, but I would not imagine its terribly different to how its done in Jamf Pro.

 

Package the desired image using composer, its best to use a .pkg but a .dmg will work with some scripting if you prefer. I put the images in /Library/Desktop Pictures. Then deploy a Configuration Profile with the Restrictions Payload with the wallpaper defind to whatever path you put your image in to and deploy.

When I get to /Library/Desktop Pictures I'm not able to add images to the folder. 

AJPinto
Esteemed Contributor

You need admin access to drop files into that directory. You can build the folder structure in Jamf Composer if you dont have admin access.

Thank you, I will try it via Composer! - I also have admin access which is why I found it weird that I haven't been able to do that. 

dletkeman
Contributor III

This is detailed in Jamf School Documentation for Device Configuration > Wallpaper.  It covers both mobile devices and computers.  If you have deployed the package to the computer specify the path in the restriction profile:

dletkeman_0-1740599582360.png

Creating the package or dmg in Composer should be straightfoward but the documentation does link to more information on that as well.  Just change the path in the Student Restrictions Profile to the new one you have deployed.

It sounds like you've done some of this already which is great.  Using Composer to create a DMG or PKG should work.

When you say you have no luck using Composer to package the image file and deploying through Jamf School what is going wrong?  Any error message?  No luck is a bit vague.

dmccluskey
Contributor II

This is a wallpaper script that will apply it but not lock it so can be changed.

 

#!/bin/bash
# $3 is the logged in user - default for most policies.
sudo -u $3 /usr/bin/osascript <<ENDofOSAscript
tell Application "Finder"
set the desktop picture to {"Library:corp:wallpaper:General.jpg"} as alias
end tell
ENDofOSAscript
exit 0

IPASupport
New Contributor

When I try to upload the DMG to Jamf School it says "Could not process the asset".

Alternatively, when I create a PKG

I save the file to:  /Users/Shared/Wallpapers and when I push it out via Jamf with a test device, it resets the wallpaper on the device to a stock wallpaper but doesn't push out the custom one that I saved into the directory. 

I started learning Jamf and Composer two months ago, inheriting a lot of what was in place (not in place) and trying to figure things out - so I'm not too familiar with every step that needs to be performed. 

IPASupport
New Contributor

Hi All,

 

I was able to figure it out! I had to update my PKG permissions and then use a script to push it out to a few devices.

 

Thank you for the help

If you found any particular reply helpful please flag it as a solution, even if it was your own so others can identify the solution. Very helpful for others.

CurtisA
New Contributor
New Contributor

Aloha and yes! 100% right place to ask! I have found this guide (for Jamf Connect) to be very succinct for how to build the PKG for macOS wallpaper. just ignore the Connect elements.

Essentially you will:

  • Create a folder in /usr/local called 'schooldesktop' (or similar) so: /usr/local/schooldesktop
  • Place the JPEG image you want to use for your wallpaper in that folder.
  • Open and authenticate to Composer, and then drag your created file from the Finder to Composer's sidebar.
    A new package source appears.
  • Set the folder permissions detailed in the linked article above
  • Build as a PKG
  • To test locally, delete the folder with the image you created on the Mac, then double click the PKG and go through installation. If you did it right, the folder with the image inside should be added.
  • In Jamf School, go to Apps, Inventory > Add App > Add in-house macOS app and upload the PKG.
  • Scope it to your device group(s).

Next, in order to set and lock the Desktop you will need a configuration profile. in the macOS profile you will set a Restrictions > Functionality payload and you will paste the full path of the image (/usr/local/schooldesktop/sampleimage.jpeg. Deploy that profile to the same group scoped above.

Let me know if doesn't work for you (or if it does).

Thanks, Curtis