0

I'm setting up LaunchAgent .plists that start up UNIX bash scripts to automatically change the desktop and screensaver for various different users for a Mac image that will be deployed to multiple Mac types.

I've got the system working fine in 10.10 and 10.9. Works like a charm every single time. However, 10.8 is being evil. (We need to run 10.7-10.10).

Here's the script:

osascript -e 'tell application "Finder" to set desktop picture to POSIX file "/Pony Files/Pony Backgrounds/7.0 Default Backgrounds/OSX08 - Default Large.png"'

I get an Applescript Error -10000 (Which I cannot find an origin for) I've also tried this variant

defaults write com.apple.desktop Background '{default = {ImageFilePath = "/Pony Files/Pony Backgrounds/7.0 Default Backgrounds/OSX08 - Default Large.png"; };}'

Neither work in 10.8. Any ideas where I'm going wrong?

  • Mac OS error -10000 (errAEEventFailed): errAEEventFailed – user128544 Jun 11 '15 at 5:55
  • Hmm, I just tested the AppleScript part on OS X 10.10.3 using your file path (which, of course, does not exist here) and it returned the same error. So I would suggest to check and make sure that the image is reachable, demo (2 lines): set newDesktopImage to POSIX file "/Pony Files/Pony Backgrounds/7.0 Default Backgrounds/OSX08 - Default Large.png" -- tell application "Finder" to if (exists newDesktopImage) then set desktop picture to newDesktopImage – user128544 Jun 11 '15 at 6:07
  • Unfortunately, AEEventFailed is about as cryptic as AppleScript can be. AppleScript mostly deals with AEEvents (AppleEvents Events are redundantly redundant) – William T Froggard Jun 14 '15 at 14:32

You must log in to answer this question.

Browse other questions tagged .