Skip to content

Instantly share code, notes, and snippets.

@ryanmaclean
Last active May 23, 2018 04:13
Show Gist options
  • Save ryanmaclean/7e6f61bc2e24bed78241 to your computer and use it in GitHub Desktop.
Save ryanmaclean/7e6f61bc2e24bed78241 to your computer and use it in GitHub Desktop.
Change Yosemite Wallpaper from Command Line
# This script changes the Apple Mac OSX wallpaper in 10.10 for the current user
# to Earth Horizon - feel free to set a different JPEG or download, then set it!
# Cribbed from this answer: http://stackoverflow.com/a/2119076
#
osascript -e 'tell application "Finder" to set desktop picture to POSIX file "/Library/Desktop Pictures/Earth Horizon.jpg"'
@weslleyaraujo
Copy link

Hey!

I am trying to run it into a Yosemite 10.10.5 (14F27) but it is not working and not returning any error neither..
does it working fine for you?

@steve-kasica
Copy link

I'm also running Yosemite 10.10.5 (14F27), but I get this error:

63:64: syntax error: Expected expression, property or key form, etc. but found unknown token. (-2741)

@lprimeroo
Copy link

@stvkas similar error .

@ryanmaclean
Copy link
Author

Hey @weslleyaraujo @stvkas and @saru95 - It was the new line and single quote. I've made it a one-liner and confirmed that it now works ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment