oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button

Rob Griffiths' Top Mac OS X Hints, Part 2

by Rob Griffiths, coauthor of Mac OS X Hints, Jaguar Edition

Editor's Note: Last week, we published eight of Rob Griffiths' favorite tips from his just-released book, Mac OS X Hints, Jaguar Edition. In case you're not familiar with Rob, he's been at this for a long time on his Mac OS X Hints site. Now here's another batch to keep you busy for a while. How does he figure out all of this stuff anyway?

Hint 9-1: Speeding Up iPhoto

When you're viewing a library, film roll, or album, iPhoto comes set to display your photos with a subtle drop shadow in the main window. While this effect looks very cool, it slows down scrolling and resizing on all but the fastest machines. Boost your speed by turning off the shadow.

Choose iPhoto->Preferences, and in the Appearance section, select either Border or No Border. (You can also change the background shade, if you want.) Return to Organize mode, and try enlarging the photos using the slider in the lower-right corner, or scroll through a collection. You'll gasp at the speed increase!

Hint 10-18: Stopping Ken Burns II

The following three paragraphs were borrowed from hint 10-17 to give this one some context online ...

One of iMovie 3's most ballyhooed features is the "Ken Burns effect." It turns still digital photos into movies, panning and zooming across them like an over-caffeinated fighter pilot. You can use it to add pizzazz to your projects, even if all you're doing is showcasing 2,352 stills of little Jimmy sleeping.

That's the good news.

The bad news is that iMovie 3 applies the Ken Burns effect to every single photo you import. And it introduces huge lags into your work routine, since iMovie 3 must render (process) each photo, instead of just slapping it into your movie like iMovie 2 did.

(Now here's the text of the original hint 10-18.)

In addition to the method outlined in hint 10-17, you can also tell iMovie never to apply the Ken Burns effect on imported photos. The trick: Edit the secret iMovie preferences file. Here's how:

Quit iMovie. Then, in the Finder, open your Home->Library->Preferences folder, and find Drag this file onto the icon of a text editor, like TextEdit or BBEdit Lite. Using the Find command (Command-F), conduct a search for the phrase ApplyPan. You've just highlighted some text that's part of these lines:

<key>Option autoApplyPanZoomToImportedStills: %d </key>

Change the <true/> tag on the second line to <false/> and save the file. The next time you open iMovie, the program will no longer insist on paying tribute to PBS's most famous documentary maker every time you import a photo.

Tip: You can still use the Ken Burns effect whenever you want it. Just select a still image in your movie, switch to the Photos section, set your Ken Burns settings, and then click Apply.

Hint 11-17: Burning a Multisession CD

Most people think that you need a program like Roxio Toast to record a CD-R disc more than once in Mac OS X. On the contrary, Disk Copy lets you burn a single CD as many times as you like! That's right, regular cheapie CD-R discs, not CD-RW (rewriteable).

What you'll create here is a multisession disc. Each time you burn more material onto it, you create a new disc icon that will appear separately when you insert the CD. Here's how to go about it:

  1. Prepare the material you intend to burn the first time. For example, put it all into a folder on your desktop.

  2. Open Disk Copy. Choose File->New->Image from Folder or Volume. When prompted, navigate to, and select, the folder you want to burn, and then click Image. You're asked to name the disk image you're creating.

  3. Type a name for the image, specify a location (like the desktop), and then click Save. In this example, suppose it's called Typestyles.dmg.

  4. When you're ready to burn, open Disk Copy. Choose File->Burn Image. Navigate to the disk image (Typestyles.dmg), and click it once. Then click Burn. The Burn Disc dialog box appears. Expand the box as shown below:

    Screen shot.
    Figure 1.

  5. Turn on "Allow additional burns," as seen in the screenshot above. Click Burn to record the material onto the CD. Disk Copy does its thing, burning your CD as though it's the first and last time. But boy, do you have a surprise for it.

  6. When it comes time to add new material to that disc, repeat steps 1 through 4. This time, in the expanded dialog box, you'll see that "Allow additional burns" is still turned on. Instead of Burn, though, the lower-right button now says Append. That's your clue that Disk Copy understands what it's about to do: add information to an existing CD, resulting in a second disk icon on the desktop containing only the new material.

  7. Click Append. You've just created a multisession disc!

You can repeat steps 6 and 7 over and over again, adding more and more material to a disc -- or at least until it's full.

Hint 12-24: Navigating a Site via the Title Bar

As you dig your way down into a web site, it can sometimes be a little tricky to get back to the original page. You can use the Back button, of course, but you either have to press and hold it to see the list of prior pages, or click it repeatedly to go back one page at a time. Luckily, Safari offers another method for backtracking.

If you command-click the title bar (centered just above the address bar), Safari displays a list of each page you've visited in the current site (see Figure 2). To navigate back, just click the page that you'd like to see.

Screen shot.
Figure 2.

This works even if you didn't actually burrow here step by step -- that is, if you jumped here directly by typing this page's address in its entirety.

Mac OS X Hints

Related Reading

Mac OS X Hints
The 500 Most Amazing Power Tips
By Rob Griffiths

Hint 13-4: Listing Files II

This hint deals with BBEdit, though this trick also works with the freeware BBEdit Lite (recently discontinued by Bare Bones).

An even more useful variation on the previous hint lets you create a printable list of the entire contents of a folder or hard drive. This is handy if, for example, you need a hard copy for archival purposes (maybe you're a former U.S. president, and you're expecting your files to be incorporated into a biography in 20 or 40 years).

If you drag a folder or hard drive icon into a new BBEdit document window, the program goes to work -- sometimes for quite a while -- and eventually displays all of the files and folders inside.

Note: This process can take forever, especially if the folder or hard drive you're investigating includes Mac OS X itself; indeed, you could wind up with a list of more than 100,000 files. Buy stock in toner and paper companies before you print it out.

Hint 14-24: More Than One Clipboard

Screen shot.
Figure 3.

If you've spent more than about ten minutes using a Mac, you're probably familiar with the Clipboard shuffle. This dance occurs when you copy and paste more than one piece of information between the same two programs.

For example, suppose you want to copy several different sections of a Web page to your word processor. So you start in the browser, copy a paragraph, switch to the word processor, paste, return to the browser, copy the next section, return to the word processor, paste, and repeat until you've got everything you want. The reason you must go through this dizzying process, of course, is that Mac OS X has only one clipboard for storing copied items.

PTHPasteboard, an excellent freeware program, can put a quick end to the clipboard shuffle. It lets you open an unlimited number of clipboards (it starts with 20). You can even create permanent clipboards for storing bits of information that you use all the time -- your return address, driving directions to your house, your favorite Star Trek quotes, or whatever.

As Figure 3 shows, PTHPasteboard makes it very easy to copy any old selection to the clipboard. Instead of flipping back and forth when you need to copy and paste multiple selections, use PTHPasteboard to copy them all, then switch to your destination program and paste them all in one step.

Hint 15-26: New Commands Using Aliases

Unix aliases aren't the same thing as Mac aliases. They're shortcuts, but instead of serving as shorthand for files and programs, Unix uses them as shorthand for existing commands. For example, if you frequently open certain programs from the command line, aliases can make the process easier. The long shadowGoogle launch command described in hint 15-38, for instance, can be reduced to "sg" --just two keystrokes.

Here's an experiment to help you understand Unix aliases. If you've set up your Unix environment as discussed in the box on page 351, the command word is an alias. If you type word hello, you get a list of words that all contain "hello." To learn how this alias works, type alias at the % prompt, which generates a list of tcsh's predefined aliases. Near the end of the output is the entry for word:

word grep !* /usr/share/dict/web2

word is the alias -- shorthand for the longer command that appears to right of it. The grep search program looks for the text you supply (!* is the placeholder for that text; in the example above, you searched for "hello"), and the search looks in the file /usr/share/dict/web2. (That file, incidentally, is Webster's Second International dictionary, right there on your hard drive. Who knew?)

Aliases can also be handy for combining commands you often use together. For example, suppose you have a remote computer to which you often connect using ssh (hint 6-9). Some computers require that you specify a particular port number (networking "keyhole") as part of the ssh command. So your ssh line becomes rather lengthy, something like this:

ssh -p 5022

Instead of typing that every time you want to connect, you can create an alias called sshwork that runs the whole command. By looking through the existing aliases, you can get a sense of what's possible. For a good example of combined commands, pay close attention to the wordcount alias, which uses two cat commands, the tail command, and the awk command.

Here's how to create your own alias:

  1. Using the pico editor (as described in the box on page 351 of Mac OS X Hints), open aliases.mine. The pico text processor opens it up on the screen.

  2. Add the alias as a new line anywhere in the file. To add this line, note that the first word must be alias; next is the name of the alias (abbreviation) you want to create; and then, in quotes, is the longer command or commands that you want to execute. For example, if you were to recreate the word alias, you'd type:

    alias word 'grep \!* /usr/share/dict/web2'

    You need the backslash to remind the shell that here, the exclamation point is a special character (!* is a special code that means, "anything following the command on the same line").

    To create the ssh alias described above, you'd type:

    alias sshwork 'ssh -p 5022'

    (Of course, substitute the real port number and email address.) To create the shadowGoogle alias described above, you'd type:

    alias sg 'open -a /Applications/My\ Utilities/'

Tip: Avoid giving one of your aliases the same name as an existing Unix command (ls, for example). If you did that, you'd be missing out if Apple ever quietly updated the "official" version with a new, improved, supercharged version. Your alias would continue to intercept your typing of ls (or whatever), and you'd miss out on the goodies.

Hint 16-5: Sharing Additional Folders with Windows

Mac OS X lets you make your Mac files visible to Windows computers on the same network -- handy if you're sitting in front of a Windows machine three floors from your desk, and you need to pull up a document from your own Mac. To make the magic work, you have to set two Mac preferences. First, open System Preferences->Sharing, click the Services tab, and then turn on Windows File Sharing. Next, on the Accounts preference panel, highlight your account, click Edit User, and then turn on "Allow user to log in from Windows." Type your password when asked. After that, you can reach your Home folder from any Windows machine on your network.

All well and good, but the Mac only shares your Home folder. What if you have an external drive and you want to make accessible the files you store on it? Two solutions let you share any folder on your Mac. The first requires turning on SWAT, the Web-based Samba administration tool, which is covered in hint 16-36. The second solution, in which you manually add your additional folders to Samba's configuration file, is explained here.

  1. Open the Samba configuration file, with root permissions, in an editor like pico or vi. The file is named smb.conf, and it lives in /etc. To gain root permissions when you open it, type sudo vi /etc/smb.conf (you can substitute another editor's name for vi). The first lines of the file are all comments, denoted by the semicolon at the start of each line. Below the comments are sections labeled "[global]" and "[homes]," plus commented-out sections for "[public]" and "[printers]."

  2. To create a new share, create a new section. For example, if your MP3 collection is stored on an external hard drive named MyMP3s in a folder named MyTunes, the following section would create a new share called MyGreatMusic:

    comment = My MP3 Collection
    path = /Volumes/MyMP3s/MyTunes
    browseable = yes
    read only = no
    create mode = 0750

    The first line (in brackets) is the name of the folder as Windows machines will see it; you can use the comment to help identify the folder when it's being shared. The path command specifies the physical location of the folder to be shared; setting browseable to yes lets Windows machines see the folder's contents. Setting read-only to no lets the contents of the folder be changed from Windows machines.

    The create mode setting sets up, in advance, the permission settings for any new files that get created in this folder. (Setting create mode to 0750 gives full privileges to the folder's owner, read-only privileges for the group, and no permissions for everybody else. This is a good default setting for create mode, as it gives you full access and restricts others from seeing the file.)

    To share additional folders, duplicate the section above -- but change the name, comment, and path for each new folder. Once you have created all of the shares you need, save the smb.conf file and exit the editor. Now you just need to activate your new shared folders.

  3. Turn off and restart Windows File Sharing (in System Preferences->Sharing, click the Services tab). You should now be able to log into your new shares from a Windows machine as easily as you can connect to your Home folder.

Wrap Up

Mac OS X is an advanced operating system with thousands of tricks up its sleeve. What I've presented here is just a sampling of the more useful hints from the book. In addition to the 550-plus hints in the book (most of which have accompanying screenshots), the site has over 3,500 hints, in a database that's updated daily. While the depth of the writing (and the number of screenshots!) cannot match what's provided by the book, the daily updates mean you'll always know the latest and greatest hints to make your time with OS X more productive.

Rob Griffiths is the creator of the Mac OS X Hints site, a database of over 3,500 tips on using OS X.

Return to the Mac DevCenter.