MacOS
View all Worklets
MacOSmacOS

Set Screen Saver

Configure custom images as screen saver with idle time and slideshow styles

Worklet Details

What the screen saver configuration Worklet does

This Automox Worklet™ deploys custom images to macOS endpoints and configures them as the active screen saver. The Worklet extracts images from a zip file you upload, places them in a user-accessible directory, and applies screen saver settings including idle timeout and slideshow style.

The Worklet uses bash scripting to identify the logged-in console user, create the necessary directory structure, and write configuration values to the macOS defaults system. It handles file permissions, cleanup of temporary files, and supports both JPEG and PNG image formats.

Why enforce custom screen saver branding

When endpoints display default or user-selected images, sensitive information may appear on unattended displays, and screen savers can expose endpoints to social engineering if they don't reflect organizational identity. Unmanaged screen savers create security and branding risks that automated deployment eliminates.

Automating screen saver deployment through this Worklet maintains all endpoints display approved images and engage the display after consistent idle periods. This approach maintains corporate branding guidelines while reducing the time administrators spend manually configuring each user's preferences.

How screen saver configuration works

  1. Evaluation phase: The Worklet script checks if the background directory and required image files exist in the user's Pictures folder location defined by the imageDir variable.

  2. Remediation phase: The script creates the backgrounds directory if needed, extracts images from the uploaded zip file, synchronizes them to the target location, applies appropriate permissions, and writes screen saver defaults including idle timeout, clock display, module type, and slideshow style via the defaults command for the console user.

Screen saver configuration requirements

  • macOS 10.14 (Mojave) or later; validated on Catalina, Big Sur, and Monterey including M1 endpoints

  • A zip file containing image files in JPEG or PNG format; the default filename is backgrounds.zip but this can be customized via the zipName variable

  • Logged-in console user at time of Worklet execution; the script requires active user context to apply user-specific defaults

  • Ability to modify user-level defaults; the Worklet runs with elevated privileges to write to the com.apple.screensaver and com.apple.ScreenSaverPhotoChooser preferences

Expected screen saver display after configuration

After successful execution, the screen saver will activate after the configured idle time (default 10 minutes) and display images in slideshow format from the Backgrounds directory. The images rotate through all items in the directory using the selected slideshow style. Users see the custom images applied immediately without requiring restart or logout, though some system preferences caching may delay visibility by several minutes. This automated deployment maintains all endpoints display approved images and consistent branding.

Verify success by checking the System Preferences > Desktop and Screen Saver settings for the console user, where the custom images now appear as the selected source. Also, examine the directory permissions on /Users/{username}/Pictures/Backgrounds to confirm images are readable by the user account. Subsequent Worklet evaluations confirm the configuration remains in place.

How to validate set screen saver changes

  1. Run this Worklet on a pilot macOS endpoint and review evaluation output for set screen saver.

  2. Confirm Automox activity logs show successful completion and exit code 0.

  3. Verify endpoint state using checks aligned to evaluation script logic, such as exit.

  4. Validate remediation effects from script operations such as mkdir, unzip, rsync, then rerun evaluation for compliance.

View in app
evalutation image
remediation image

Consider Worklets your easy button

What's a Worklet?

A Worklet is an automation script, written in Bash or PowerShell, designed for seamless execution on endpoints – at scale – within the Automox platform. Worklet automation scripts perform configuration, remediation, and the installation or removal of applications and settings across Windows, macOS, and Linux.

do more with worklets