Tutorial 15 min read
85

macOS 26 Tahoe Day, Morning, Evening, and Night based on clock

Viktor Shchelochkov
Viktor Shchelochkov Fullstack developer

Yesterday I found out that the new macOS Tahoe rolled out globally this Monday has four Aerial (video) wallpapers: Tahoe Day, Tahoe Morning, Tahoe Evening, Tahoe Night. All of them show the same place during different time of the day. To my surprise, these four beautiful wallpapers aren't dynamic. For some reason Apple did not make all of them a single dynamic wallpaper like it was in Big Sur and Catalina. Perhaps, making video wallpapers dynamically change was a challenge. Or the reason for publishing them separately was the fact that each of these 4K HDR videos has a size of about 450 MB. That's 1.82 GB for all four!

List of files in macOS finder displaying four Tahoe wallpaper videos
You can find these videos at ~/Library/Application Support/com.apple.wallpaper/aerials/videos/ after downloading them through System Settings

Regardless, I really wanted these wallpapers to change automatically based on system clock.

AppleScript #

The first thing I tried was using AppleScript to change wallpaper by communicating with Finder or System Events.

Script Editor app screenshot with AppleScript code

This didn't work with videos. You can set a photo with AppleScript but you can't pass a video.

In fact, while experimenting and trying to find which property sets the desktop picture in Finder, I only found deprecated keys and meaningless values i.e. "missing value".

Shortcuts #

I then tried the new macOS shortcuts app built-in with recent versions. Shortcuts app is supposed to be a user-friendly way to manage the system without technical knowledge.

Shortcuts screenshot demonstrating how I choose path to file and putting it into the "Set wallpaper to (file)" action

However this is still limited to photos only.

Shortcut error "Set Wallpaper Photo failed because Shortcuts couldn't convert from PDF to Image"

Apple Configurator & Configuration Profiles #

Following the advice of LLMs, I found that you can also manage Mac settings via Configuration Profiles. This is actually what enterprise organizations use to configure corporation Macs.

Apple Configurator screenshot with no information about creating profile for Mac

The default Apple Configuration app wasn't useful at all. It appears that this app was made for iPhone, iPad, iPod and Apple TV configuration, not for Macs.

Apple Configurator app screenshot showing empty sidebar where configuration actions should be

I couldn't even create a profile because Configuration Profile actions sidebar was empty. No items, no save button, nothing.

I then found a third-party app called ProfileCreator which simplifies process of creating Configuration Profiles. It's free & you can find it on GitHub.

ProfileCreator app screenshot showing a bunch of options to create the profile

I even found the setting I wanted to configure automatically — the "Desktop Picture" payload.

ProfileCreator screenshot with "Desktop Picture" payload and "Desktop picture path" input field

However, when I tried putting a mov video file into "Desktop picture path" and applying this configuration to my Mac settings, all I got was a pale blue wallpaper, indicating that my Mac could not load the desktop wallpaper and falls back to the default one.

Automator #

I also tried the Automtor app which is a more technical and flexible version of shortcuts. But it does not even have the wallpaper setting action. It does have a "Install Wallpaper on Devices" action which supposed to "copy a JPEG file to the specified devices and set it to be the default wallpaper", but

  1. It only works with images
  2. Even then, it only works with "supervised devices" i.e. corportaion-locked devices which is not what most of you have
Automator app with empty search results for "wallpaper" aside from the "Install Wallpaper on Devices" action which only works for supervised devices

I also tried to "Record" macro (also called "Watch me do") but all it did was record my cursor movements and clicks.

Automator app showing sequence of events: "Click System Settings in the Dock", "Click the button"

This is very brittle and will break as soon as anything on your screen changes. Needless to say, it will also disrupt your work by hijacking your cursor four times a day and doing clicks and mouse movements.

SQLite dbs, plists and defaults #

I also tried various commands from the internet that were supposed to change wallpaper automatically. I'm going to save your time and tell you they ALL are outdated. Even commands for Sonoma do not work anymore.

What's really happening is built-in WallpaperAerialsExtension is rendering the "Aerial" background (the video wallpaper itself). You can find it by typing "wallpaper" into Activity Monitor app and monitoring what files this system extension uses.

Activity Monitor screenshot with WallpaperAerialsExtension details info dialog showing Tahoe Day video file handle in list of open files

As you can see, this OS extension, located at /System/Library/ExtensionKit/Extensions/WallpaperAerialsExtension.appex/Contents/MacOS/WallpaperAerialsExtension is using whatever video wallpaper is selected at the moment. When you change it in Settings.

I tried inspecting this appex thing and found that it likely communicates with System Settings via XPC undocumented protocol (who would have guessed) and there isn't much I can do aside from playing guessing game of how this extension accepts input.

I also wanted to use PyObjC library but without documentation on this extension I couldn't really interact with it anyway.

Finally, the solution #

After all of these failed approaches I tried looking up for apps that already offer wallpaper changing capabilities. I did find some paid apps but you're likely reading this because you want something FLOSSy. 

Aerial — Apple TV Aerial Views Screen Saver

And I found just that! The project is called Aerial and it's fairly popular so you might have heard about it. It has 20k stars on GitHub and a pretty active community and maintainers. They even released bug fixes for Tahoe.

Now I'm going to guide you on how to setup it to rotate Tahoe wallpapers automatically.

Just a heads up — you need the Aerial Companion, not the saver thing. Although you might need to installing both. Download Aerial.saver.zip from GitHub releases page (for me it's v3.6.3), unpack and install the Aerial.saver file into your Mac settings.

Aerial.saver file

Then go to Aerial website and download Aerial Companion app (for me it's 1.5.2) and drag it to the Applications folder.

Aerial Companion in Applications folder

Go through initialization dialog but make sure to select "I'll handle things myself" if you only want Tahoe videos to play on your wallpaper. Otherwise the app will download a lot of other video wallpapers.

I recommend setting Aerial's "adapt videos based on time of day" setting to either "Use my location" or "Use macOS Night Shift" (both require Geolocation Services permission in your System Settings for Aerial).

Aerial app screenshot with "Adapt videos based on time of day" settings

Now head to System Settings, open Wallpaper section and download all four Tahoe videos: Tahoe Day, Tahoe Morning, Tahoe Evening, Tahoe night.

Wallpaper settings with Tahoe Day video wallpaper selected

After downloading all four you should open this folder in Finder: ~/Library/Application Support/com.apple.wallpaper/aerials/videos/ and copy all four videos somewhere else on your computer. It's best if you put these videos to /Users/shared subdirectory such as /Users/shared/tahoe_dynamic.

Finder app with "Go to" dialog open
You can press "CMD + SHIFT + G" hotkey to open "Go to" dialog in Finder

Now rename these files to something meaningful, like "day.mov", "evening.mov", "morning.mov" and "night.mov". Do not change the file extension.

Finder app screenshot with "day.mov", "evening.mov", "morning.mov" and "night.mov" video files in "tahoe_dynamic" folder

Open Aerial, go to "More Videos" section and make sure all checkboxes are unchecked. If you had any checked, you might want to right click and delete sources, so that they don't mix up with Tahoe wallpapers.

Aerial settings screenshot with "More Videos" section selected

Click "Add Local..." button and enter path to the folder where you saved those four video wallpapers.

Aerial's "Add a Local Source" dialog
Tip: you can also drag-n-drop folder from Finder to this input field to automatically fill its path

Click "Add Folder" and make sure that this folder is now enabled in list. It should show "4 videos". You can request to search this folder again by clicking "Refresh Now" button.

Aerial settings with "tahoe_dynamic" folder selected

Now to the most important part: automatically switching these videos based on time. Click on the "folder" icon at the end of your folder item in Aerial settings. It should open Finder with directory containing two files: entries.json and manifest.json.

Finder screenshot with "entries.json" and "manifest.json" files

You need to edit the entries.json file. If you're not familiar with JSON I recommend reading simplified guide on its syntax and then coming back. You must have a code editor (such as Visual Studio Code) or a word editor (not word processor, such as TextEdit or Word) that is capable of working with JSON.

Open the file and you should see JSON encoded settings.

JSON settings in "entries.json" file

If you're fine with editing JSON directly, you can skip the next step, otherwise I suggest you open jsoneditoronline.org website to easily edit this file. Copy everything in this file to JSON Editor Online and toggle the "tree" view.

JSON Editor Online screenshot showing formatted structure of entries.json
Tip: you can also paste the JSON without switching to text view by simply pressing CMD+V while in tree view

You should see four JSON objects under the "assets" key numbered from 0 to 3 inclusive. Confirm that these four objects have paths to four different Tahoe video wallpapers.

We're only interested in "timeOfDay" in each object. According to this line of code in Aerial's sources it accepts "sunset", "sunrise" and "night" as values and treating every other value as fallback to day. So edit these four objects by setting respective values.

JSON Editor Online screenshot highlighting timeOfDay values in four objects representing different video wallpapers

Finally, save your changes to the entries.json file.

To confirm that you did everything correctly, open the "Now Playing" section and choose "Times" in "Play videos from selected" dropdown.

Aerial settings screenshot with "Now Playing" section selected

You should now see exactly one video in each category: Sunset, Night, Day, Sunrise. Make sure all of them are selected. If you accidentally hidden any of them, you can undo this in "Browse Videos" section by enabling "Hidden" filter.

The final step is to actually start Aerial rendering wallpaper videos. To do that, click on Aerial's icon in Status Bar and click on "Dock" icon.

Aerial mini menu screenshot highlighting the "dock" icon button

If you've done everything correctly, your Desktop should now play video corresponding to current time of the day.

Bonus: performance issues #

Please note that Aerial has no capability to pause the video after log in like Apple's native Aerial player does. The current solution to this by developer is to just set the speed to lowest possible value.

Play speed slider

Bonus 2: screen saver #

While I primarily care about Desktop background, the Aerial app itself was actually made for screensavers. You might want to set your OS screensaver to Aerial and get the same automatic Tahoe video wallpaper playing while you're away!

Aerial screen saver instructions

Do note that the screen saver options are now located in "Wallpaper" section in System Settings. The app still displays instructions for previous versions of macOS. This is a bug...

System Settings screen saver options

If you enjoyed this article, consider giving it a thumbs up 👍 reaction below or sending me a tip!

Published at:
11
2
0
8
0
0
0
9
2
0
0
1