On previous macOS versions, Apple wrote Desktop image locations to
/Users/\<current-user\>/Library/Application Support/Dock/desktoppicture.db
However on macOS Sonoma this seems to have changed.
desktoppicture.db no longer contains up to date information about the current wallpapers / their paths. Does anyone know where the new database is located?
I've been using these solutions for years:
How to get the path to the current workspace/screen's wallpaper on OSX?
Getting desktop background on Mac
and https://github.com/musically-ut/whichbg, which is a neat tool written in Swift
Update
found this github issue: https://github.com/JohnCoates/Aerial/issues/1332
but the plist looks like (using plutil -p)
"Displays" => {
"37D8832A-2D66-02CA-B9F7-8F30A301B230" => {
"Desktop" => {
"Content" => {
"Choices" => [
0 => {
"Configuration" => {length = 292, bytes = 0x62706c69 73743030 d5010203 04050607 ... 00000000 000000ef }
"Files" => [
0 => {
"relative" => "file:///Users/me/Backgrounds/"
}
]
"Provider" => "com.apple.wallpaper.choice.image-folder"
}
]
"Shuffle" => {
"Duration" => [
0 => 97
1 => 10665824850173493248
]
"Type" => "afterDuration"
}
}
"LastSet" => 2023-11-30 04:16:17 +0000
"LastUse" => 2023-11-30 04:16:23 +0000
}
not sure how to get the path out of here, the previous db had it directly as a string
There is no database that I know of. I was able to locate the current desktop photo by using “console” I filtered for BEGIN - IMAGE CACHE LOOKUP Leave it running, it will update with every wallpaper change.