Blog Archives

how to change all Desktop backgrounds



With Lion came the welcome ability to have individual background wallpapers for each Desktop. However, what Apple forgot to add was an option to easily make all the Desktops have the same background image when you want it that way.

There are a few workarounds, but probably the simplest – once it is setup – is to use this little script I wrote for some ASC members. It should take you about 5 to 10 minutes to set this up if you follow the procedure carefully.

1. Open TextEdit, and choose TextEdit > Preferences.
Change the settings from ‘Rich Text’ to ‘Plain text’ for New Documents. Close the Preference pane and chose File > New.

2. Copy everything in the box below and paste it into the TextEdit file you just opened:

#! /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

3. Save the file to

/Library/Desktop Pictures

with the name ‘ChangeAllDesktops’.

IMPORTANT: Make sure you remove the ‘.txt’ file extension in the name field AND uncheck the option at the bottom of the Save box that says ‘If no extension is provided, use .txt’.

Note that you will need to press the ‘authenticate’ button when prompted in order to save anything into the ‘Desktop Pictures’ folder. Type your password in the dialogue that pops up.

4. Open Terminal.app.
Make the ‘ChangesAllDesktops’ file executable by copy/pasting this into the Terminal window:

sudo chmod a+x /Library/Desktop\ Pictures/ChangeAllDesktops

Press ‘return’ and type in your password. The password won’t echo to the screen, so type carefully.

5. Make Terminal the default app for the file
Open a Finder window. Click on your hard disk icon in the sidebar (if you can’t see it, go to Finder > Preferences > Sidebar and check Hard disks under the ‘Devices’ section). Navigate to the Library/Desktop Pictures folder and right-click on the ‘ChangeAllDesktops’ file.

Select Open with and then Other…. In the window, 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’ and ‘OK’.

6. Make a shortcut for Desktop Pictures
Drag the folder ‘Desktop Pictures’ to the Finder sidebar to make a convenient shortcut. Now when you want to change all Desktop backgrounds at the same time, click in ‘Desktop Pictures’ in the Finder sidebar, run the ‘ChangeAllDesktops’ file, and drag an image from the (already) open Finder window into the Terminal window that appears.

Press ‘return’ and your desktops are all changed! 🙂



Related Posts
learning the Terminal — Part One
learning the Terminal — Part Two

how to get Spaces and Expose on Lion



(Note: If you’ve just installed Mountain Lion, be sure to run ‘Check for Updates’ by clicking on the Total Spaces icon in the menubar)

Yes, it’s possible to bring back most of those beloved Snow Leopard features that Apple unwisely did away with in Lion, and – if you get them now – for free with 3rd-party apps. I’ve been hunting down a way to get rid of all the Mission Control behaviour on my trackpad, to return the app-switcher trackpad gesture, the 2-dimensional Spaces grid and, of course, Expose.

OK, so here’s how I finally got all those lovely Snow features back to Lion. You’re going to need two free tools (free for now, so don’t hang around…), namely:

Total Spaces from http://totalspaces.binaryage.com
Better Touch Tool from http://blog.boastr.net

Once you’ve downloaded these you’re half way there, but you’ve got to complete the job by setting them up properly. In the remainder of this post, I’ll walk you through how I’ve got them set up. Try it this way first, then once you’ve got the hang of it, you can tweak it to your own style. 🙂

1. Total Spaces > Preferences:

</p?



In BetterTouchTool Preferences:





In  > System Preferences > Trackpad:

Finally, disable the Mission Control hotkeys in  > System Preferences > Keyboard | Keyboard Shortcuts:

With this configuration, you change spaces by holding down ‘option’ and any of the arrow keys to move round a grid of 9 spaces (you can have more or less if you want in TotalSpaces prefs).

You see all spaces (like the screenshot at the top of the page) by holding down ‘command-option-left_arrow’.

You bring up Expose with a 4-finger downward swipe on the trackpad (note: Expose is unavailable while an app is in Full Screen mode), and the App Switcher with a 3-finger tap.

Oh, and Mission Control? Drag it off the Dock to about centre screen and release. Should you ever need it you can always go and double-click on it in your Applications folder, but otherwise you’ll soon forget it ever existed.

And that’s it — proper Spaces, Expose, and Trackpad functionality restored! 🙂


assign apps to a desktop in Mission Control

Mission Control allows you to assign an app to particular desktop, so you can keep your work organised in different screens, and move between tasks with a swipe of the trackpad.

The easiest way to assign an app to a desktop is to first run the app so it appears in the Dock. Then, if you’re not already in the desired desktop, change to the desktop that you want the app to always appear in.

Next, place the cursor over the icon, and right-click (or two-finger tap if you have this gesture set for the trackpad).

Navigate through options and assign the app to ‘This Desktop’. That’s it!





%d bloggers like this: