Set Your Mac’s Wallpaper Using a Terminal Command
Installing wallpapers on your Mac is easy enough, but if you want to automate changing them, adding the wallpaper to an installation script, or whatever, you’ll need to do it from the command line. OS X Daily shows you how.
Basically, you’re using part of the script here from AppleScript, so it’s easy to adapt to the various automation settings you may have. Open Terminal and enter this, 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 all, you will have a new wallpaper right away. It’s not very exciting on its own, but it’s a good command to know for automation purposes.
Setting wallpaper from the command line on Mac OS X | OS X Daily