Setting a desktop picture in Mavericks28 Oct 2013
Sometimes we are asked by clients to set a default desktop picture for new users - sometimes we are deleting home directories on logout, so need to warn the users, other times the client just wants their corporate wallpaper to be the default.
If you are lazy and don’t want to read this post then the script that changes the desktop picture is on GitHub.
Whatever, here’s what we used to do:
Nothing earth shattering there if you’ve managed Macs for any length of time.
But then 10.9 changed things - this stopped working.
I ran fs_usage to see what was happening whilst I changed the desktop picture on my machine:
Obviously there was a metic buttload of information, but this line caught my eye.
Bingo! I opened up the database in the SQLite Manager Firefox extension (the only thing I use Firefox for these days) and had a peek. And then I got half a brain and googled the path of the desktoppicture.db file and found that there was a gist from Greg Neagle. Perfect!
Of course, he’d already improved upon this script and written a proof of concept to set a random desktop picture using PyObjC. This got me 90% of the way there, so this is my modified version of his script. The full code and usage instructions are over on GitHub.