How to change desktop wallpaper for all virtual desktops?

Solution 1:

Set the wallpaper for Desktop 1, delete all other desktops, then recreate them. New desktops created always share Desktop 1’s wallpaper.

Solution 2:

Another option until Apple gives us a better one:

If, like me, you have your additional desktops arranged just how you like them, then the thought of deleting and recreating them just to change the wallpaper would be like recommending that I demolish my house so that I can repaint the walls. I'm not going to do that.

Instead, you can open up your Desktop preferences ( > System Preferences... > Desktop & Screen Saver ), then change the wallpaper on the current desktop.

Then, open Mission Control (on my machine, I launch Mission Control with the "Swipe up with three fingers" gesture) and drag & drop the Desktop & Screen Saver window onto the next desktop. The window will update to reflect the new desktop in focus and I can switch that desktop's image to whatever I want it to be. Repeat for as many desktops as you have. (If you have multiple monitors, then each monitor will have it's own Desktop window, named something like "Secondary Desktop".)

This is a lot easier than closing and reopening the desktop preferences on each desktop, and way easier than deleting and recreating all desktops (for me, at least).

Solution 3:

From my comment on JDB's answer:

  1. Right-click on the Dock icon for System Preferences and select Options > [Assign To] All Desktops.
  2. Select your desired image for the current desktop from System Preferences.
  3. Keep the mouse pointer hovered over that image, and use the ctrl-arrow keyboard shortcut to quickly cycle through each desktop. As you arrive on each, click the mouse button to set that desktop.

You'll be done in about 5 seconds.

Solution 4:

This might not be the answer you are looking for, but it is by far my favorite (requires Python3):

I have always used pywal on all of my Linux machines, and I just wanted to see if it would also work on MacOS, and indeed it does. Not only will it change the desktop image for all desktops with a single command, but it also has the ability to set your Terminal colors to a theme to match your desktop background (as long as you are using iTerm2 and not Terminal.app).

https://github.com/dylanaraps/pywal/

I would suggest cloning it from the git repo and building it from source, as there is an issue with the current version on PyPI that does not include a fix to show the cursor location in iTerm2.

If you think it would be easier to install it from PyPI and patch the file, that is also an option -- just run pip3 install pywal, and then find the location of sequences.py in your site-packages/pywal directory (mine happened to be at ~/Library/Python/3.9/lib/python/site-packages/pywal/sequences.py), and then just copy sequences.py from the master branch to your site-packages, and you are good to go.

My full installation went something like this:

$ pip3 install --user pywal
$ find /usr/local -type f -name "sequences.py"
(or)
$ find $HOME -type f -name "sequences.py"
> ./Library/Python/3.9/lib/python/site-packages/pywal/sequences.py
$ git clone https://github.com/dylanaraps/pywal
$ cp pywal/pywal/sequences.py ~/Library/Python/3.9/lib/python/site-packages/pywal/sequences.py

Then all you have to do to set the wallpaper for all desktops is run the following:

wal -i $HOME/Pictures/Wallpapers/your_image.jpg

...and bingo-bango it sets the wallpaper for ALL desktops AND gives you nice pretty matchy colors in iTerm2.

There are instructions in the pywal wiki on how to make the terminal colors persist across reboots by adding a line to ~/.bash_profile.

So all that being said, while this method may take a bit more time to set up, in the long run, I find it by far to be the easiest and most satisfying.

Also, just a heads-up: wal -i /path/to/image does not work for some images, and I'm not sure why, but it worked for most of the images I tested.