Mavericks desktop background picture settings moved from ~/Library/Preferences/com.apple.desktop.plist
While I was preparing for Mavericks’ release, I ran across little details that had changed between Mountain Lion and Mavericks. One such detail is that the desktop background picture settings have moved.
In Mountain Lion, they were stored in the following location:
In Mavericks, the settings have been moved to a SQLite database at the following location:
Removing desktoppicture.db causes the desktop picture to reset to whatever image is stored as /System/Library/CoreServices/DefaultDesktop.jpg
Fortunately, there are still ways to manage the desktop background picture if that’s needed. For the details, see below the jump.
Change OS X’s DefaultDesktop.jpg to set the desktop picture
Going back to 10.5.x, an easy way to set the default desktop wallpaper in OS X has been to replace the /System/Library/CoreServices/DefaultDesktop.jpg file with your own .jpg file. This method still works in Mavericks and is the approach I’ve taken in my own shop for setting the default desktop background for new accounts.
In my own shop, I wanted to set the desktop picture to be different from DefaultDesktop.jpg for one particular account: our local admin account. To help our techs quickly identify which OS they’re working on, we’ve been setting the background to match the OS version’s name:
10.6 – Snow Leopard picture
After attempting to script it, the approach I decided to use was to set the desktop picture on one machine for the local admin account, then I copied the database file. From there, I built a package to drop the database file in the right place on new machine setups. This approach has worked great to set the desktop background for my local admin account.
Setting the desktop picture with AppleScript
You can use AppleScript via osascript to set the desktop background using this command:
osascript -e "tell application \"System Events\" to set picture of every desktop to \"/path/to/image.jpg\""