Set Wallpaper on macOS devices
  • 29 Sep 2023
  • 1 Minute to read
  • PDF

Set Wallpaper on macOS devices

  • PDF

Article summary

The following Shell script helps IT Admins to deploy an image to their macOS devices and set it as a wallpaper.

  1. Create a file on your desktop, for example, and open it in a text editor like notepad++
  2. Copy the contents below to the file or click hereto download the file.
    # Add the download link
    ##### DO NOT EDIT BELOW CODE #####
    curl $imageDownloadURL -o $localImagePath
    osascript -e 'tell application "Finder" to set desktop picture to POSIX file "'"$localImagePath"'"'
    if [ $ret == "0" ]; then
    echo "Wallpaper set successfully "
    echo "Operation failed."
  3. This shell script will download an image from a specified URL and will set it as the desktop wallpaper on a Mac.
  4. Replace "DOWNLOAD_URL" with the actual link from where image is to be downloaded. For example:
  5. Follow our guide to upload & publish the Shell script using Scalefusion Dashboard.
  6. Please note that when this script gets executed by the Scalefusion MDM Client app, the following permission will show up on the Mac. This needs to be allowed in order for the Scalefusion MDM Client app to execute it.
    Please note that to use the Shell scripts, the Scalefusion MDM Client Application must be installed on the device(s). Please follow our guide to publish and install the Scalefusion MDM Agent Application.


    1. The scripts and their contents are sourced from various albeit authenticated Apple Developer communities and forums.

    2. Please validate the scripts on a test machine before deploying them on all your managed devices.

    3. Scalefusion has tested these scripts, however, Scalefusion will not be responsible for any loss of data or system malfunction that may arise due to the incorrect usage of these scripts.

Was this article helpful?