Sonoma: Is It No Longer Possible to Fetch Wallpaper File Names?

Under Ventura, desktop wallpaper image names were stored in a sqlite database at ~/Library/Application Support/Dock/desktoppicture.db. This file is no longer being used under Sonoma.

I have a process I built that fetches the desktop image file names and displays them, either as a service, or on the desktop. I do this because I have many photos I've taken, and I like to know which one I'm viewing so I can make edits if necessary. I set these images across five spaces and have them randomly change every hour. I tried using AppleScript but it would not pull the file names.

A few people have pointed me to ~/Library/Application Support/com.apple.wallpaper/Store/Index.plist. However, on my system, this only reveals the source folder and not the image name itself. On one of my Macs, it shows 64 items, even though I have only five spaces!

Is there a way to fetch the image file names under Sonoma? Will Sequoia make this easier or harder?

Is there a way to fetch the image file names under Sonoma?

There’s no supported way to get a list of all the wallpaper images. The best you can do is get the current image, using either NSWorkspace or Apple Script. However, even that has its challenges, as discussed on this thread.

You program previous relied on an implementation detail. These things can and do change over time, which is why your code broke.

Will Sequoia make this easier or harder?

The only way things are going to get easier is if we add a full-featured API for this. I’m not aware of any such API in macOS 15 beta. Feel free to file an enhancement request for that.

In the absence of a proper API, things are likely to get harder as Apple continues to improve security and privacy on macOS.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Dang.

Thank you, Quinn. I think this dashes my hope of creating a small utility. I'm not a Swift coder and AppleScript hasn't worked for this kind of thing for some time. Apple's built-in "everyman tools" such as Automator, Shortcuts and AppleScript aren't really meant to get this deep, even with shell scripting included.

I suppose I could request this type of enhancement, as there are a lot of similar queries online, but I suspect it's too insignificant for Apple to spend time and resources on.

{Sigh}. I long for the days of HyperCard. :)

Sonoma: Is It No Longer Possible to Fetch Wallpaper File Names?
 
 
Q