Cycle Your desktop images
Prior to version 5, you could use iPhoto to create cycling desktop picture albums: You could create a new album in iPhoto, go to the Desktop tab of the Desktop & Screen Saver preference pane, and choose that album from the list of iPhoto albums. Once you selected the Change Picture option and set your desired interval, you had a changing desktop picture that revealed the album’s images one by one. But the Change Picture option is always grayed out for albums (smart and standard) created in iPhoto 5 (as part of Apple’s iLife ’05, $79).
Here’s the easy workaround: in iPhoto, create an album (File: New Album) and fill it with the pictures you want to display on your desktop. Next, click on the album in the Source list and choose Edit: Select All (or press Command-A) to select all the images in that album. Click on the Desktop button in the iPhoto toolbar. When you do, iPhoto creates a new subfolder (called iPhoto Selection) in the iPhoto Library folder. This subfolder holds aliases of all the images in your album. The Desktop section of the Desktop & Screen Saver preference pane automatically opens, with iPhoto Selection highlighted. If you have only one monitor hooked up to your Mac, select the Change Picture option and specify the desired interval.
If you have two monitors and want the images to appear on the secondary one (the one that doesn’t contain a menu bar), you won’t find the iPhoto Selection option in the Desktop & Screen Saver preference pane on the second screen. Instead, you must select Choose Folder from the folder list, and then navigate to your iPhoto Library folder (/ your user name /Pictures/iPhoto Library) in the dialog box that appears. Within the iPhoto Library folder, highlight the iPhoto Selection folder and click on Choose. Select the Change Picture option and set your time interval, and you’re done.
Select the desktop from any Finder window
Here’s a quick keyboard shortcut you may have missed. From any Finder window, you can activate the desktop by pressing Command-shift-up arrow. If you have your Finder preferences set to show hard disks on the desktop, this will activate the desktop with your boot disk selected. If you’ve chosen to hide hard drives from the desktop, then the desktop will be active with nothing selected. Press tab to select items on the desktop, one by one, in alphabetical order (numbers precede letters).
For a bunch of other Finder keyboard shortcuts, select Help: Mac Help in the Finder and then search for
shortcuts for the Finder. Click on the result with that exact name, and you’ll see a slew of handy shortcuts. (The list includes the one I just described, but in Tiger and Panther you don’t need to include the option key, as the Help file states.)
Tweak the Finder for a faster feel
The Finder uses visual feedback to let you know what it’s doing. For instance, when you double-click on a folder to open a new window, you get a subtle zoom-out effect. These animations help you understand what your machine is doing, but they can also make a not-so-powerful machine feel slower than it is. With a little help from Terminal, you can disable some or all of the Finder’s animations.
Launch Terminal (/Applications/Utilities) and type the following command:
defaults write com.apple.finder DisableAllAnimations -bool true
(That’s
-boolwith a lowercase L, not the number 1. )
This command disables the animations, but to see the changes, you need to restart the Finder. The safest way to do this—to log out and log back in—is also the most time-consuming. Instead, just hold down the option key and then click and hold on the Finder’s Dock icon. When the pop-up menu appears, select Relaunch.
After the Finder has relaunched, you’ll find that window-opening and -closing animations, as well as roll-down and roll-up animations in the Get Info window, have vanished. You won’t gain any real speed increases, but the Finder will feel snappier than before.
Another option is to reinstate the window animations while leaving the Get Info animations disabled. Return to Terminal and type these two commands:
defaults write com.apple.finder DisableAllAnimations -bool false
defaults write com.apple.finder AnimateInfoPanes -bool false
The first command reverses what you did previously. The second tells the Finder to disable only the Get Info animations. Again, you’ll need to option-click and hold on the Finder’s Dock icon, and then relaunch the Finder to see your changes take effect.
To enable the Get Info animations, repeat the last command but type
trueat the end instead of
false, and then relaunch the Finder again.
Animate Keynote slides with Quartz Composer
Here’s a trick for Tiger users who work with Keynote 2 (as part of Apple’s iWork ’05, $79). With help from one of the free Developer tools on your Tiger installation CD, you can bring the background of any given slide to life.
Install the Developer (Xcode) tools. Then open Quartz Composer (/Developer/Applications/Graphics Tools). This app is tricky to use, but you don’t have to know much to use it with Keynote—you may not even have to open it. Just go to Keynote’s Insert: Choose menu to import a QTZ (Quartz Composer) file.
The simplest way to start is to use some of the Apple-provided examples you’ll find in the Developer folder. In Keynote’s Choose dialog box, navigate to /Developer/Examples/Quartz Composer. Many of the subfolders here contain ready-to-use examples, such as Cells.qtz and Star Shine.qtz (located in the Core Image Compositions folder). Select one of these, and Keynote will insert it into the current slide.
You can treat the animation just as you would any other Keynote object. Add a drop shadow, adjust its transparency, and even scale it (though you may see some jagged images when you greatly increase the size of an animation). When you enter the slide-show mode, the animation comes to life. If you place the Quartz Composer animation on a slide with photo cutouts, you can even put the animation behind the cutout (using Arrange: Send Backward), for some visually interesting effects.
If you want to use an example that needs editing, such as Slide.qtz from the Parametrizable Compositions folder, you’ll need to do a bit of work within Quartz Composer itself. Double-click on the sample composition in the Finder, and Quartz Composer opens in Edit mode. To use Slide.qtz, for instance, you’d want to get rid of all the text, leaving just the animated background. In Quartz Composer’s Editor window, click and drag to select every box except for the pink Clear (1) and Lighting (2) boxes near the top. Then press the delete key or choose Edit: Delete. The Viewer window reflects your changes, and the text vanishes. Choose File: Save As to save your modified composition to a new location so you don’t overwrite the original. Switch back to Keynote and insert the new version to create a pleasant blue background.
You can do a lot with the example files, but to create your own fancy backgrounds, you’ll have to learn the program. For more information, see “Tiger’s Secret Tools” ( Geek Factor, September 2005 ) or read Apple’s documentation.
Import particular images quickly with Preview
Have a photo on your digital camera that you need to work with but don’t want in your iPhoto library? Say you had to take a couple of product shots at work, or maybe you took a photo of a document as a quick-and-dirty way of scanning it. Sure, you could launch iPhoto, import all the images in the camera, and then copy just the one you want to work with. You could also use Image Capture (/Applications) to download the images. In Tiger, though, you have a third, simpler choice.
Plug in your camera and make sure it’s powered up; then launch Preview. (Quit iPhoto if it launches automatically and offers to import the images.) Choose File: Import Image. After choosing your camera from the list of devices, you’ll see a small Image Capture-like window that lets you select any one image from your camera for direct import into Preview (see the screenshot). You can even change the image’s size.
Once you’ve imported the image, save it using any of Preview’s supported image formats, available from the File: Save As menu item.
There’s no need to use iPhoto or Image Capture if you want to download just one picture out of many. Use the newest version of Preview to import a particular image directly from your digital camera.OS X 101: Secrets of the Dock, part 2
In the September issue, I covered the basics of the Dock and how to use the applications stored on its left side. This month, I explore the right side (or the lower half, if you’ve oriented your Dock vertically).
While the left side of the Dock stores applications and only applications, the right side can store documents, folders, and URLs. It’s also where minimized windows hide until you need them again (press Command-M in any open window). And it holds the Trash. You can access the Dock no matter what application you’re in, so you’ll always have quick access to anything you store here.
Documents If you use a file often, consider storing it on the right side of the Dock. Just drag and drop it from the Finder into the area between the divider bar and the Trash icon. You can now open this document with a single click.
Folders To store a folder, drag and drop it into any open space on the right side of the Dock. All it takes is a mouse click to see the benefit of storing a folder here. Click and hold or control-click on the folder (or right-click on it if your mouse is so equipped), and you’ll see a fully navigable pop-up menu of the folder’s contents (see top screenshot). There’s no limit to the depth to which you can drill, though folders holding many items will take some time to display the first time you open them.
URLs If you use Apple’s Safari or The Omni Group’s OmniWeb (or any other browser based on Apple’s open-source Web Kit), you can use the Dock to store Web addresses. Just click on the small icon next to the URL in your browser’s address bar, and drag the URL into an open space on the right side of the Dock. A small spring icon with an symbol on top will appear. Hover the cursor over the icon, and you’ll see the page’s title. If you have a site (or two) that you visit all the time, this is a great way to reach it in a hurry.
Trash Tricks You may think the Trash can’t do anything but delete files, but that’s not true. You can use it to eject disks, iPods, and other removable media. Drag a disk over the Trash icon, and it changes into an eject icon.
With the right side of the Dock, toolbars, and the Sidebar, OS X gives you a number of ways to keep often-accessed items close at hand.
Check It Out: Erase CD-RWs with one click
If you use re-recordable CDs (CD-RWs), you’ve probably longed for a simple, Finder-based way to erase them. Currently, that job requires a trip to the Erase tab of Disk Utility (/Applications/Utilities). But if you’re running Tiger, you can use Automator to build a contextual menu that lets you erase CD-RWs from the Finder.
Launch Automator (/Applications) and click on the Automator entry in the Library column. In the Action column, double-click on Ask For Confirmation. The action will appear in the work area on the right side of the Automator window. Type
Are you sure you wish to erase this CD-RW?in the message field, and then type
Pressing OK will erase the contents of the CD-RW currently in the drive.in the explanation field.
Next, double-click on the Run Shell Script entry in the Action column. The action will appear below the Ask For Confirmation box on the right side of the window. In the Run Shell Script box, replace the word
catwith
hdiutil burn -erase.
When you’re done, your Automator screen should look like the one shown in the bottom screenshot.
Choose File: Save As Plug-in and give your new plug-in a name—for example, Erase CD-RW. When you control-click on the Finder, you’ll see this name under Automator in the contextual menu. Leave the Plug-in For pop-up menu set to Finder, and click on Save. Now switch back to the Finder, control-click on a mounted CD-RW, and choose Automator: Erase CD-RW from the pop-up menu. After you click on OK in response to the confirmation question, Automator will erase your CD-RW.
Note that I’ve tested this tip only on systems with one recordable drive. If you have both an internal and external drive, you may get unexpected results.
Unix Tip of the Month: Control text from the command line
Have you ever needed to convert a text file from one format to another—say, from HTML to pure text, or from text to Microsoft Word’s .doc format? Though many OS X programs are up to the task, Tiger lets you do it all from Terminal—with
textutil. The basic form of the conversion command is as follows:
textutil -convertformat name file name
(Important note: For any of these conversion commands to work, you need to either move into the directory where the files reside [using the
cdcommand] or specify the file’s full path. To add the path to a command, simply drag the file to the Terminal prompt.)
For example, to create a text file from the raw HTML source you saved from a Web page, you would type the following:
textutil -convert txt MyHTML.html
By default, the output file name will get its name from the input file, but the extension will match the format used in the conversion ( .txt in this example).
The
textutilcommand can do more than just convert text formats, though. The
-infooption will give you information such as type, size, length, and (for HTML files) title—just type
textutil -infofile name to see this. You can also use
textutilto merge multiple text files into one. To merge files, you use the
-catoption, which comes from concatenate, another word for merge. Just give
textutila list of files to merge, along with the format to use, like so:
textutil -cat txt file1.txt file2.txt file3.txt
When you press return, the command will merge the three files into one new file, named
out.txtby default. If you’d like to control the output file name, just use the
-outputflag to set the path and name:
textutil -cat txt -output MergedFile.txt file1.txt file2.txt file3.txt
Notice that the output file name (
MergedFile.txt) comes before the list of files you’re merging, not after.
[ Senior Editor Rob Griffiths is the author of Mac OS X Power Hound, Panther Edition (O’Reilly, 2004), and runs the Mac OS X Hints Web site. ]
OS X 101: Storing folders on the right side of the Dock will let you navigate their depths with a simple click. Check It Out: Why bother with multiple clicks every time you want to erase a CD-RW? Instead, create this simple Automator action and access it from the Finder’s contextual menu.