I'm trying to add to my OS X configuration script a command which sets the background to the plain dark grey, however, when applied, it only sets it to the main monitor and any additional monitors currently connected keep their current background and any added thereafter still receive the default space background. What I have so far is as follows:

# Change Desktop default BackgroundColor to grey
defaults write com.apple.desktop '{ Background = { default = {BackgroundColor = ( "0.25490197

How do I set the default the the dark grey background via a terminal command? How do I change all monitors already configured to grey via a terminal command?

set localLibrary to path to library folder from local domain as string
set desktopImage to localLibrary & "Desktop Pictures:Solid Colors:Solid Gray Dark.png" as alias
tell application "Finder" set desktop picture to desktopImage end tell You can easily turn any of the above Applescripts into a terminal command using osascript [-e statement]:osascript -e 'set desktopImage to POSIX file "/Library/Desktop Pictures/Solid Colors/Solid Gray Light.png"tell application "Finder"
set desktop picture to desktopImage
end tell'
  • 1
    Can you walk through the script, to make it a little easier for visitors to understand it? – Canadian Luke Dec 17 '14 at 1:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.