How to set positioning/filling of desktop background image with AppleScript

applescriptcommand linedesktop

How can I set the positioning/filling of the desktop background image from the command line with one of the available options listed in the Desktop & Screen Saver preferences:

Crop, SizeToFit, FillScreen, Centered, Tiled

I can set the desired background image itself using:

osascript -e "tell application \"Finder\" to set desktop picture to POSIX file \"/Library/Desktop Pictures/Beach.jpg\""

However I'm not sure how to set the positioning/tiling.

Best Answer

According to

'AppleScriptEditor' > File > Open Dictionary >
   Finder > Legacy Suite > Application > desktop picture

all you can do is set the picture.

There are references to messing about with the .plist file, but the internet (and Apple) are silent on an Applescript-approved route.

This plist is empty for me in Sierra: ~/Library/Preferences/com.apple.desktop.plist so I imagine Apple have hidden what used to be there inside one of their even less well documented databases.