Change Mac Desktop Wallpaper With a Custom Command

Some organizations require that all of the company's managed macOS devices have custom wallpaper set as the desktop background. This article contains two procedures for IT Admins to control a user's desktop wallpaper:

  • You can create a custom command and use an MDM Custom Configuration Profile and a policy to enforce a specific wallpaper file.

Important:

Do not use this procedure in conjunction with the Mac Wallpaper Modification Policy.

  • Alternatively, you can create a Mac Wallpaper Modification Policy that allows users to change their wallpaper, and then provide the wallpaper file to them.

Prerequisites:

  • The device or device group must be enrolled in Mobile Device Management (MDM) to use this method.
  • The wallpaper image file must be hosted in publicly accessible cloud storage accessible via URL, for example an AWS S3 bucket. 

Creating a Custom Command for Wallpaper

Three steps are required to fully control a macOS user’s wallpaper:

  1. Create a custom command to provide a wallpaper image to your devices.
  2. Create a custom configuration profile to provide a path to the wallpaper image.
  3. Create a policy to deliver and enforce the wallpaper.

To create a custom command for wallpaper for macOS:

  1. Log in to the JumpCloud Admin Portal.
  2. Go to DEVICE MANAGEMENT > Commands.
  3. Click (+), then choose Command to create a new command.
  4. Under Name, enter a name for the command. For example, Desktop Wallpaper.
  5. Under Run As, choose root.
  6. Under Type, click Mac.
  7. Copy the following code block and update the URL value with the location of the hosted background image file. Then enter it in the Command field in JumpCloud:

#!/bin/bash

# Change this line
URL="https://your-image-url/background.jpg"

# Do NOT change below
# Destination path
DESTINATION="/Users/Shared/background.jpg"

# Download the image file
curl -o "$DESTINATION" "$URL"

  1. Under Event, choose Run Manually.
  2. (Optional) Under Timeout After and Time to Live Settings, adjust the times to your preference.
  3. Select the Devices or Device Groups tab, then bind the command to the device or group where you want to set the wallpaper.
  4. Click save.
  5. Find the newly created command in the commands list and click Run Now to send the image to the device or group of devices. 

Creating a Custom Configuration Profile

Create a custom configuration profile using a profile editor like iMazing or Apple Configurator 2. The following instructions use iMazing for example.

To create the custom configuration profile in iMazing:

  1. Go to File > New to create a new profile.
  2. The General settings display. Configure the following options:
    1. Enter a Name for the profile.
    2. Leave the Identifier unchanged.
    3. Under Payload Scope, select System.
    4. Under Target Device Type, select Mac.
  3. In the top right search box, search for Desktop Picture and click + Add Configuration Payload.
  4. The Desktop Picture settings displays.
  5. Under Desktop picture path, enter the local path configured in the previous section: 

/Users/Shared/background.jpg​

  1. Go to File > Save to save the profile. Proceed to the next section and use this profile to create the Custom MDM Policy.

Creating a Custom Policy to Enforce a Wallpaper Change

You'll create a custom policy to deliver a .mobileconfig file to enforce the wallpaper change.

  1. In the Admin Portal, navigate to DEVICE MANAGEMENT > Policy Management.
  2. Under the All tab, click +.
  3. Select the Mac tab.
  4. On the New Policy panel, select the Mac tab.
  5. Select the MDM Custom Configuration Profile policy, then click configure.
  6. For Policy Name, enter a name for this policy. For example, Desktop Wallpaper.
  7. Under Settings, click upload and select the .mobileconfig file you modified in Creating a Custom Configuration Profile above.
  8. (Optional) Select the Device Groups tab. Select one or more device groups where you'll apply this policy. For device groups with multiple OS member types, the policy is applied only to the supported OS.
  9. (Optional) Select the Devices tab. Select one or more devices where you'll apply this policy. 
  10. Click save. This sets the desktop wallpaper on the device or device group.

Creating a Wallpaper Modification Policy

This policy gives users the ability to change the desktop wallpaper on their macOS devices. Configuring and applying this policy lets users use the Apple menu > System Settings > Wallpaper and upload a company wallpaper file that you provide.

To create Mac Desktop Wallpaper Modification policy:

  1. Log in to the JumpCloud Admin Portal: https://console.jumpcloud.com/login.
  2. Go to DEVICE MANAGEMENT > Policy Management.
  3. Under the All tab, click ( + ).
  4. Select the Mac tab.
  5. Locate the Wallpaper Modification policy, then click configure.
  6. Under Policy Name, enter a name for the policy. For example, EMEA Wallpaper Modification.
  7. Under Settings, select Allow Changing Desktop Wallpaper to let users control their wallpaper through Apple menu > System Settings > Wallpaper. If you don’t select this field, users cannot change their wallpaper on their macOS devices.
  8. (Optional) Select the Device Groups tab. Select one or more device groups where you'll apply this policy. For device groups with multiple OS member types, the policy is applied only to the supported OS.
  9. (Optional) Select the Devices tab. Select one or more devices where you'll apply this policy.
  10. Click save.
Back to Top

Still Have Questions?

If you cannot find an answer to your question in our FAQ, you can always contact us.

Submit a Case