Set Your Mac’s Wallpaper With A Terminal Command

Set Your Mac’s Wallpaper With A Terminal Command
Facebook may have decided that you shouldn’t see the news, but we think you deserve to be in the know with Lifehacker Australia’s content. To sign up for our daily newsletter covering the latest news, hacks and reviews, head HERE. For a running feed of all our stories, follow us on Twitter HERE. Or you can bookmark the Lifehacker Australia homepage to visit whenever you need a fix.

Setting your Mac’s wallpaper is easy enough, but if you’re looking to automate changing them up, adding a wallpaper to a setup script, or whatever else, you’ll need to do it from the command line. OS X Daily shows you how.

Essentially, you’re using a part of a script from AppleScript here, so it’s easy to adapt this to different automation setups you might have. Open up Terminal and type this in, replacing “/path/to/picture.jpg” with the location of your image:

osascript -e 'tell application "Finder" to set desktop picture to POSIX file "/path/to/picture.jpg"'

That’s it, you’ll instantly have a new wallpaper. It’s not too exciting on its own, but it’s a good command to know for automation purposes.

Setting Wallpaper from the Command Line in Mac OS X [OS X Daily]