Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

mission control - how do I change all my wallpapers

So Lion gives me the chance to have separate wallpapers per "space" or whatever we're calling them now. However, I don't really want to and the idea of changing 9 spaces wallpapers one at a time seems like a retrograde step not a move forward. Is there any way to change all of them at once?

MacBook, Mac OS X (10.7)

Posted on Jul 20, 2011 3:08 PM

Reply
Question marked as Best reply

Posted on Jul 23, 2011 4:57 PM

It is actually very easy to change all of the desktops at once to do that go to desktop 1 and change the wallpaper after that all futere desktops created will match the wallpaper of desktop one. With the exception of the desktops already created. You will have to change them manually. But if you just change desktop 1 (the main desktop) all future desktops will be the same. Hope this helped.

74 replies

Jul 2, 2012 10:39 AM in response to softwater

Here's the script:


#! /bin/bash

#script to change all desktop backgrounds


echo -n "Drag and drop an image file here then press 'return'...:"

read -e WLPR;


function change_wallpaper

{

defaults write com.apple.desktop Background "{default = {ImageFilePath='$WLPR'; };}"; killall Dock

}

change_wallpaper


This is what you do with it:


1. Copy the code above into a plain text editor. If you use TextEdit make sure it's not in .rtf format. My favourite free editor is Tincta.


2. Save the file as 'ChangeAllDesktops' in your ~/Desktop folder (be sure to remove the .txt ending).


3. In Terminal make the file executable by typing (or copy/paste):


chmod a+x ~/Desktop/ChangeAllDesktops


4. In Finder right-click the file and select "Open with" and then "Other...". Navigate to Terminal.app in /Applications/Utilities. It will be greyed out, so change "Recommended Applications" to "All Applications" in the menu at the bottom of the window. Do not check "Always Open With". Choose Terminal.app.


After clicking OK you should be able to execute it whenever you want by simply double-clicking it on the Desktop (of course you can move it to somewhere else, if you want).


When it runs, Terminal will open and ask you to drag an image file into the Terminal window. After doing so, press 'return'.


Desktops changed!

Jul 2, 2012 12:17 PM in response to Rod_V

That's actually a different situation, I believe. Even in Snow Leopard you had to change external monitors sepeartely. I could probably figure it out, but sometimes you do want externals to be different, especially if one of them is for presentations or something.


And I also saw a comment about Mountain Lion. As much as I tested it, they fixed A LOT of the bugs, but overall it's almost exactly like Lion, that's why I think they should release it as a patch or at least release the bug fixes for what's in Lion as an update.

Jul 2, 2012 12:21 PM in response to computerfox

Thanks for the reply - But they are aparently different preferences. The way I described above in my earlier thread change all on both my Cinema display and my MBP. It didn't effect my display out to a projector (which I do all the time). That's a completely different desktop image that I can also change if I wanted to. I usually keep that one just black for when I am doing presentations.


Also a word of advice, if you do figure it out, just make it a simple script. No one wants a large program or something they have to worry about. We can very simply see a script and what it is doing and that make us feel safer.

Jul 2, 2012 1:08 PM in response to Rod_V

Hey Rod_V, if you look at the script that I posted (https://discussions.apple.com/thread/3191097?answerId=18804273022#18804273022), and the web page I reference, you'll see some more sophisticated python code that changes all desktops on all monitors. Or at least that's what it says it does. And if it doesn't work perfectly, it seems pretty simple and easy to debug and fix.

Jul 2, 2012 9:38 PM in response to vanRijn

Thanks, but the drag and drop thing is a bit annoying.


To make it a bit less inconvenient, move the file to


/Library/Desktop Pictures


(note: you will need to authenticate when prompted in order to save into the 'Desktop Pictures' folder),


then drag the folder 'Desktop Pictures' to the Finder sidebar to make a convenient shortcut.


Now when you want to change all Desktop images, click in 'Desktop Pictures' in the Finder sidebar, click this file, and drag image from the (already) open Finder window. If you save all your Wallpapers in this location then there'll all be in one spot and the window open when you run the program


I've changed the script slightly from above to include the escape sequence, as many people aren't familiar with Terminal, so what if...


1. I ran the script but now I don't want to use it?

If you change your mind or select the wrong file, you can use 'control-c' to kill the script without making the change. If you don't enter anything but press 'return', you'll change all the wallpapers back to the default galaxy pic, so the 'control-c' trick is worth knowing.


2. I dropped the wrong file onto Terminal?

If you drop the wrong file and want to chose another one, just keeping pressing the 'delete' key till its removed from the command line, then drop the correct file. Alternatively, you can still use 'control-c' to kill the script at any time before you hit 'return'.


Here's the slightly changed script:


#! /bin/bash

#script to change all desktop backgrounds


echo -n "Drag and drop an image file here then press 'return' or

press 'control-c' to cancel..."

read -e WLPR;


function change_wallpaper

{

defaults write com.apple.desktop Background "{default = {ImageFilePath='$WLPR'; };}"; killall Dock

}

change_wallpaper



###################

#after testing, save this program in /Library/Desktop Pictures

#drag the folder 'Desktop Pictures' to the Finder sidebar

#now when you want to change all Desktop images, click in 'Desktop Pictures'

#in Finder, click this file, and drag image from the open Finder window

#note: you will need to authenticate when prompted

#in order to save into the 'Desktop Pictures' folder

###################

Jul 3, 2012 2:13 AM in response to Rod_V

Rod_V wrote:


It changes the desktops on the primary monitor but not on the secondary (which is my Mac Book Pro). Any way to get it to change those as well?


Ah, funnily enough I was using an external today at work and noticed this. I agree its annoying.


Hmm, I'll have to hunt around in the default properties list and see if I can find the command. Shouldn't be too difficult to build into the script once I have that. If anyone knows it, please post here.

Aug 28, 2012 6:55 AM in response to atlaz

For anyone wanting an application to do this without any hassle, I've combined softwater's latest script with the "Ask for Finder Items" Automator action and rolled up an application. Grab that here: http://www.2shared.com/file/Y-gLgRhX/Change_All_Desktops.html

For those who suspect suspicious downloads, it can be recreated in Automator with an "Ask for Finder Items" action followed by a "Run Shell Script" action containing the following:


read -e WLPR;


function change_wallpaper

{

defaults write com.apple.desktop Background "{default = {ImageFilePath='$WLPR'; };}"; killall Dock

}

change_wallpaper


Save as an application and you're ready to rock and roll.

mission control - how do I change all my wallpapers

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.