{"id":2232,"date":"2015-10-06T11:41:04","date_gmt":"2015-10-06T11:41:04","guid":{"rendered":"http:\/\/blog.designed79.co.uk\/?p=2232"},"modified":"2015-11-05T03:48:16","modified_gmt":"2015-11-05T03:48:16","slug":"set-os-x-wallpaper-via-sqlite","status":"publish","type":"post","link":"https:\/\/blog.designed79.co.uk\/?p=2232","title":{"rendered":"Set OS X Wallpaper via SQLite"},"content":{"rendered":"<p>None of the\u00a0other solutions work on Mavericks anymore because Apple moved the settings to a sqlite DB. But that&#8217;s ok because now it&#8217;s easier, the png can be anywhere in the filesystem, and all desktops (even virtual) are updated.<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">&nbsp;#!\/usr\/bin\/env bash<br \/>\n&nbsp;sqlite3 ~\/Library\/Application\\ Support\/Dock\/desktoppicture.db &quot;update data set value = '\/path\/to\/any\/picture.png'&quot;;<br \/>\n&nbsp;killall Dock;<\/div><\/div>\n<p>Or, add it as a function to your ~\/.bash_profile and call it as a terminal command with any non-relative path.<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\"># &nbsp; Update all Wallpapers<br \/>\nfunction wallpaper() {<br \/>\n&nbsp; &nbsp; sqlite3 ~\/Library\/Application\\ Support\/Dock\/desktoppicture.db &quot;update data set value = '$1'&quot; &amp;amp;&amp;amp; killall Dock <br \/>\n}<\/div><\/div>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">wallpaper ~\/path\/to\/any\/picture.png<\/div><\/div>\n<p>or AppleScript<\/p>\n<div class=\"codecolorer-container text default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"text codecolorer\">osascript -e 'tell application &quot;Finder&quot; to set desktop picture to POSIX file &quot;\/path\/to\/picture.jpg&quot;'<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>None of the\u00a0other solutions work on Mavericks anymore because Apple moved the settings to a sqlite DB. But that&#8217;s ok because now [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2232","post","type-post","status-publish","format-standard","hentry","category-info-on-tech"],"_links":{"self":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2232"}],"version-history":[{"count":0,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2232\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.designed79.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}