Apple Event: May 7th at 7 am PT

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

Sep 15, 2012 2:23 AM in response to atlaz

I've made the follwoing suggestion to Apple. If others do the same, Apple might make the desired changes.


'Hi. My suggestion concerns the efficient changing of desktop pictures for multiple desktops. I have four desktops with specific apps assigned to them, so I don't want to delete three of them, change the desktop picture on the one remaining, then re-create the other three and re-assign the apps to them. I also don't want to change each one individually. These options are too inefficient.


It would be better if, when a picture is selected in the Desktop & Screen Saver pane of System Preferences, there were an option to apply it to more than one desktop. This would present a dropdown list of all created desktops, with a tickbox/checkbox next to each one's name, and an 'Apply to all' option at the top, so that the chosen desktop picture can be applied to only those desktops selected here. Alternatively, this list could appear automatically when the picture is selected.


Perhaps the same could be applied to the selection of screen savers.


Thank you.'

Sep 25, 2012 3:19 PM in response to batwing5

I was playing with this again today, not really happy with any of the solutions I've seen. I first started looking into python/appscript, which used to expose the internal bits necessary to do this, but I discovered that it's been discontinued. I did find some nice Applescript examples that led me down a different path. Here's what I've ended up with. And my apologies to the numerous people who came up with partial solutions to this... this has been cobbled together from their work, but I didn't keep track of all the parts.


This Applescript (I saved mine as ~/bin/changeBackground.scpt) will prompt you for a new background image, then it will iterate through all your spaces and per each space iterate through all monitors and set the background image. I have 8 spaces, for example, so this script will prompt me for a new background image and then switch to desktop 1, change both right and left monitor backgrounds, and then switch to desktop 2 and so on. This is only the second time I've tried playing with Applescript at all, so there's probably some things I'm not doing right, but thus far, this seems to be working better than the other options I've tried!


It's still a little goofy because it requires actually flipping through the spaces (at least it's automated!) while it changes the background for each space. And this particular implementation requires the user to manually set how many desktops they have, as well as the keybinding that takes you to desktop 1 as well as the keybinding for "move right a space". I would LOVE to see this Applescript enhanced so it doesn't require that to be changed per individual user. And this script requires "enable access for assistive devices" to be set under Universal Access.


But anyway... disclaimers aside, I'd love to hear comments, etc. =:)


-------------


-- pick a new background image

set theFile to choose file


-- Find out how many spaces/desktops you have (this doesn't work on Lion?):

tell application "System Preferences"

reveal anchor "shortcutsTab" of pane id "com.apple.preference.keyboard"

tell application "System Events" to tell window "Keyboard" of process "System Preferences"

set numSpaces to count (UI elements of rows of outline 1 of scroll area 2 of splitter group 1 of tab group 1 whose name begins with "Switch to Desktop")

end tell

quit

end tell


log numSpaces


-- the above doesn't work, apparently, so set the number of spaces/desktops manually

set numSpaces to 8


log numSpaces



-- Loop through the spaces/desktops, setting each of their backgrounds in turn:

-- *Note*: Set your keyboard shortcut for desktop 1 if it's different

tell application "System Events" to key code 18 using {command down} -- Desktop 1


repeat (numSpaces) times

-- Now loop through each monitor (confusingly called desktop) and change its background

tell application "System Events"

set monitors to a reference to every desktop

set numMonitors to count (monitors)

log numMonitors

repeat with monitorIndex from 1 to numMonitors by 1

set picture of item monitorIndex of the monitors to theFile

end repeat

end tell

delay 1

-- switch to the next desktop

-- *Note:* Set your keyboard shortcut for "next desktop" if it's different

tell application "System Events" to key code 124 using {command down, control down} -- ⌘→

delay 1

end repeat

Oct 9, 2012 10:11 PM in response to atlaz

Quick Fix!


If you have have 16 desktops and you have different apps assigned to all of them—like me—then you may not want to delete and re-add all of the desktops! As far as I know, you'll have to reassign them. Here's a quick fix:


Open up Change Desktop Background by right clicking on any desktop. Change to the desktop you want. Now, while Change Desktop Background is still open, go into Mission Control mode (F7 on my laptop) and move the Change Desktop Background dialogue box to the next desktop that you want to change. I changed all my backgrounds in about 2 minutes! :-)

Mar 3, 2013 11:13 AM in response to atlaz

Well I read through this thread and decided there needs to be an easier way so I developed a Preference Pane to make this easy. The code for this Preference Pane is Open Source so you are more than welocme to look at the source and modify to your hearts content. Read more about it here (This page has a link to the GitHub repository for those who want the source code).

Apr 30, 2013 11:27 AM in response to vanRijn

Hm. I just looked at the source code and you're setting the wallpaper by running this shell command:


defaults write com.apple.desktop Background '{default = {ImageFilePath = "<image chosen>"; }; }' && killall Dock"


I was hoping you'd found some Cocoa API's to actually change the wallpaper directly. Are you still working on improving this? Or does anyone on this long thread know if there are Cocoa API's to set the wallpaper for a desktop space?

Dec 9, 2013 9:02 AM in response to SandersKY

Why do all the awesome scripts/apps linked here 404 already? It hasn't even been that long...


I was hoping to use SandersKY's open-source solution but his link is down too and he provided no links to the github project from this thread, only from the web page that is now down. ARG this is so annoying! I'm using OS X Mavericks and this is STILL broken. I'm beginning to think I just need to use that stupid default Mavericks wallpaper and stop trying to customize my OS in order to save myself some frustration.

Jun 11, 2014 6:21 PM in response to atlaz

My easiest, just a click per space:


1. set space #1 with the new desktop background you prefer for all.

Next (swipe 4 fingers up) to Mission Control:

2. add a new space (which will appear with the new BG)

3. swipe towards it (swipe 4 fingers right towards it)

4. and delete space #2 (all applications from that space #2 do move to the newly made space)

Have a moment of 'wow', donate much money to my account, and/or honor me in your daily prayers.

No need to re-order the spaces, just repeat steps 2-5 to replace all other old spaces.


Sincerely,

AAANEN

Jun 12, 2014 9:04 AM in response to aaanen

Perhaps some will find your suggestion useful, although it's inefficient to delete and create desktops just for changing the background. The problem for me is that the apps I have set to open in certain desktops would have to be reset to do so. This adds to the inefficency, when all I want to do is apply one background to all desktops.


Thanks.

Jun 12, 2014 9:54 AM in response to aaanen

I tried it but not with the apps open; I'd have to open too many and it would be inefficient just to change the desktop background. I deleted only one of the desktops after creating one, and then found that the apps that had been set to open on the now deleted one were not set to open on its replacement desktop.


Perhaps I should have done it with all of the desktops instead of just one, but I didn't want to have the trouble of re-assigning all the apps to their different desktops.


Also, I'm using Mavericks, not Lion, so maybe that makes a difference.


Thanks anyway.

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.