Set a user's Desktop image in macOS Mojave 10.14 from the command line. See Limitations
An explanation for why this script does what it does can be found at Setting the Desktop Image in Macos Mojave From the Command Line
[bash] /path/to/set-desktop-mojave.sh <desktop image>
[bash] /path/to/set-desktop-mojave.sh mojave
[bash] /path/to/set-desktop-mojave.sh light
[bash] /path/to/set-desktop-mojave.sh dark
[bash] /path/to/set-desktop-mojave.sh solar
[bash] /path/to/set-desktop-mojave.sh "/Library/Desktop Pictures/High Sierra.jpg"
[bash] /path/to/set-desktop-mojave.sh "/Library/Desktop Pictures/Ink Cloud.jpg"
[bash] /path/to/set-desktop-mojave.sh default
ERROR: For use with macOS Mojave 10.14.x only.
ERROR: No image was specified.
ERROR: '/path/to/desktop/image.jpg' doesn't exist.
ERROR: 'option' is not a valid option.
ERROR: The 'default' option is only appropriate when the database is ~/Library/Application Support/Dock/desktoppicture.db
ERROR: This script should not be used in a dual-monitor environment.
ERROR: This script should not be used when multiple Desktops (Spaces) are configured.
Works only with a single Desktop (Space) in a single-display environment.
Not for use with multiple Desktops (Spaces) or in a dual-display environment.