Latest Posts in Mac OS X Hints

Create a tab-switching gesture shortcut in Firefox 3.5

Posted by Rob Griffiths on
4 comments

The recently-released Firefox 3.5 supports multi-touch gestures on newer Mac laptops, at least if you believe this Firefox features page. However, these gestures don’t seem to be documented in detail anywhere on the Firefox Web site—it’s acknowledged that they exist, but there’s no apparent documentation on which gestures do what.

To save you some experimentation, today’s hint will cover the pre-programmed Firefox gestures, and explain how to activate gestures to support switching between tabs. You can find all the pre-programmed gestures in Firefox by going to the “hidden” configuration page. Open a new browser window and enter about:config in the URL entry area. When you press Return, you’ll be greeted by a scary warning, letting you know that you may void your (non-existent) warranty if you proceed. Click the “I’ll be careful, I promise” button to go ahead and enter Firefox’s detailed configuration page.

This page is definitely somewhat scary looking—and the warning shouldn’t be taken too lightly, because you can really break Firefox if you just make arbitrary changes to the preferences you’ll see listed here. What you’re looking at are the values for every preference that Firefox uses—both those that are user-settable (browser.tabs.warnOnClose reflects the setting on the Tabs tab in Preferences for warning before closing multiple tabs) and those that are not (such as those we’re about to change).

To see all the existing gestures, click in the box next to Filter and type browser.gesture; you don’t have to press Return, as Firefox will update the list of matching preferences on the fly. The resulting list shows all the pre-defined gestures and their associated actions; for ease of reference, they are:

  • Pinch: If you pinch in (move two fingers towards one another), you’ll zoom out on the current page. Pinch out to zoom in on the current page. In addition, if you add the Shift key to either gesture, you’ll reset the zoom level to the default value (100 percent).
  • Swipe: Swipe left (three fingers on trackpad; drag left) to move back to the prior page in the current window; swipe right to jump to the next page in the current window. If you swipe down, the browser will jump to the bottom of the current page; swipe up to jump to the top.

The one gesture that seems to be missing is the ability to switch tabs. However, if you’ll look at the matches on the about:config page, you’ll see both browser.gesture.twist.left and browser.gesture.twist.right are listed. In the Value column, however, neither shows a value, indicating that they’re undefined. With two simple changes, you can activate these gestures, too.

Double-click on browser.gesture.twist.left; this will drop down a sheet showing an empty text input box. Type Browser:PrevTab into the box, then click OK. Then double-click on the browser.gesture.twist.right preference, and enter Browser:NextTab into the text box and click OK.

That’s it; you can now use a pinch gesture—put two fingers on the trackpad and then twist them to the right or left—to move between tabs in Firefox 3.5. If you want to, you can also redefine the other gestures (maybe you want pinch in to zoom in, though I would find that very confusing!). If you make a change you want to undo, Control-click on the preference in question and choose Reset from the contextual menu.

I’m not sure why the twirl gesture is disabled by default, but with it active, I find it a very intuitive way to change tabs in Firefox 3.5.

How to add URLs to Address Book records

Posted by Rob Griffiths on
4 comments

Address Book includes a useful feature that you may not be aware of, as it’s not really fully enabled by default. The feature is the ability to store a URL with a contact—you can see this on the Apple Computer contact card (or vCard, if you want to be technical), where you’ll see Apple’s URL next to the Home Page field label. This field is useful not just within Address Book, but in other programs as well. For instance, a number of Mac web browsers—Safari, OmniWeb, and Camino, at least—include bookmarks for these Address Book URLs, making it easy to access Wweb sites associated with your various contacts.

You may be wondering, though, just how to get the URL into Address Book in the first place—if you create a new card, you won’t see a Home Page field there by default. Solving this problem is fairly trivial, especially for experienced Mac users; if that’s you, you probably won’t learn anything new from this hint.

To add a Home Page field to a current card in your address book, select the record you’d like to modify, then click the Edit button. From the menu, select Card -> Add Field -> URL to put the Home Page field on the selected card. Enter the URL and click Edit again when done.

If, instead of doing this on a one-by-one basis, you’d like to have the Home Page field appear on every card, including newly-created cards, open Address Book’s preferences, and click on the Template button. Click the Add Field drop-down menu and select URL from the list of options. (Feel free to add any other fields you use regularly.)

As soon as you make this change, the Home Page field will appear on all your existing cards, as well as on newly-created cards. Spend the time to populate it, and you can save a step by jumping to a contact’s home page directly from Safari, OmniWeb, or Camino.

Create Events-based iPhoto albums featuring specific people

Posted by Rob Griffiths on
2 comments

If you use iPhoto ’09 and its Events organizational feature in a true events manner—separating your photos by actual event—then you may have stumbled onto a limitation in the current version of iPhoto. Let’s say you’re interested in creating a photo album for a friend who you’ve photographed at a number of events. But you don’t just want photos that contain your friend in this album; you want all the photos from any event they attended.

While iPhoto offers a plethora of choices when creating a Smart Album, “all events containing person X” isn’t one of the options. However, thanks to Mac OS X Hints reader Justin Carter, you can create just such an album with a fairly simple process.

First select Faces from the Library section of iPhoto’s sidebar, then double-click on the face of the person you’re interested in using for the all-events album. Use drag-select to select all the “known” faces for that person, and then click on Events in the Library section of the iPhoto sidebar.

When you click back into Events, you’ll see that any events containing the faces you selected are now highlighted. Click the Plus sign to create a new album, and make sure that the “Use selected items in a new album” option is checked in the dialog that appears. Type in a name for your new album, click Create, and you’re done—the new album will contain every event in which the selected person’s image appears at least once.

Repair incorrect icon associations

Posted by Rob Griffiths on
2 comments

Have you ever had a problem with incorrect icons in OS X—instead of seeing the proper “zipper” icon for zip files, for example, you see a FireWire drive icon or a disk image icon. When I’ve been asked about this in the past, I never had an answer for how to fix it beyond “reboot and hope it goes away?” Either that advice worked, or those to whom I provided it realized I knew nothing on the subject and didn’t bother to write back.

Now, however, I know the real cause of the problem, and an effective solution. The icon problem is caused by corruption in the Launch Services database. Launch Services, as described by Apple, is “…an API that enables a running application to open other applications or their document files or URLs (uniform resource locators) in a way similar to the Finder or the Dock.”

The solution to the incorrect icon problem is to rebuild the Launch Services database, which is the same solution to another problem—double entries in the Open With menu, as described in our Leopard Power Tips article.

There are many ways to rebuild the Launch Services database. The easiest is to use a third-party utility such as Cocktail or TinkerTool. If you’d rather not use a third-party app, you can do it yourself in Terminal (in Applications -> Utilities). If you’re running Mac OS X 10.5, execute this command:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user

If you’re running 10.4, the path to the lsregister program differs; use this command instead:

/System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

You don’t need to logout or restart for this fix to work; you should see that the incorrect icon associations have been fixed as soon as the command completes.

Change color of BBEdit and TextWrangler 'invisibles' characters

Posted by Rob Griffiths on
2 comments

Bare Bones Software's two text editing applications, BBEdit and TextWrangler, have the ability to show invisible characters in your documents—spaces, tabs, line breaks, page breaks, and control characters. Using the View -> Text Display menu, you can choose to see either just the invisible characters, or the invisible characters and spaces—when active, these invisible characters are replaced by visible entities.

The visible characters are split into two groups for color purposes. Control characters, and other oddities that normally appear in red are in one group, and spaces, tabs, carriage returns, non-breaking spaces, and page breaks are in the other group, which are gray by default. If you prefer to use a light gray (or perhaps red?) background, this can be a problem. Thanks to Mac OS X Hints readers CkB_Cowboy and Mark Johnson, however, you can actually customize the colors of these characters, with a little help from Terminal.

To set the color for these two groups, you first need to decide which color you’d like to use. If you’ve got an image editor that can display colors with their 16-bit RGB values, you can use that to find a color you like.

image
Digital Color Meter

Read more...

Reduce system workload during drive cloning

Posted by Rob Griffiths on
24 comments

If part of your backup strategy includes cloning your Mac’s hard drive using a tool such as SuperDuper or CarbonCopyCloner, you’ll want to make sure that Spotlight isn’t active on that drive before you start cloning to it.

By default, Spotlight indexes everything it finds, anywhere on your system—including on the hard drive you’ll be using for your clone. If Spotlight is active while cloning, your machine will also have to work hard while cloning—all those newly-created files will be added to Spotlight’s index. Another downside to leaving Spotlight active on your clone drive is that you’ll get double matches for anything you then search for—one match on your Mac, and another on your clone drive.

While some of these apps may block Spotlight on their own, I always do it myself, just to be sure the drive has been removed from Spotlight. To disable Spotlight, first connect the drive onto which you’ll clone your Mac’s hard drive. Assuming it’s already been formatted and is ready to go, it will mount in the Finder. Then open up the Spotlight System Preferences panel. Click the Privacy tab, then click the plus sign, and select your to-be-cloned volume in the dialog that appears.

I’m not sure there’s any speed to be gained by disabling Spotlight prior to cloning, but your CPU won’t have to work as hard while cloning, and you won’t get double matches when you finish. Speaking of finished, you might want to insure that the drive still appears on the Privacy tab after cloning—I’ve seen reports that sometimes cloned drives mysteriously vanish from the Privacy panel, though I haven’t seen that myself. Thanks to Mac OS X Hints reader Jules Hobbes for today’s tip.

Updated on Friday June 26th at 10:37am to correct an inaccuracy regarding which drive to disable Spotlight indexing on.

Using iPhoto's Places without a GPS-enabled camera

Posted by Rob Griffiths on
6 comments

iPhoto ’09’s Places feature lets you organize and view photos by location. If you’ve got a newer higher-end digital camera, it may make this process painless—if the camera has a GPS chip, then iPhoto will read the GPS data when you import your pictures. But if you don’t have a GPS-enabled camera, the process of assigning a place for every photo can be really time consuming.

But if you also carry an iPhone 3G or iPhone 3G S (and to some extent, a first generation iPhone) in addition to your digital camera, you can greatly ease the task of assigning places. When you’re about to start taking a bunch of pictures on your digital camera, first take one on your iPhone 3G/3G S. The iPhone will tag the photo with the GPS location. If you’re using a first-generation iPhone, it will attempt to set the location using cell tower triangulation and nearby Wi-Fi antennas.

After taking your location-establishing shot with the iPhone, start snapping with your digital camera. Repeat this process each time you move to a new location.

When you get back home, import the images from both the iPhone and your digital camera into iPhoto ’09. Within the event containing your iPhone photos, select the image that correlates to your first location and press the small “i” icon to confirm that a location was recorded with the photo. Assuming it was, click Done, then press Command-C to copy the photo.

Now select all the digital camera pictures taken at that same location, Control-click on one of the selected photos, and choose Paste Location from the pop-up menu. Presto, just like that, the location info from the iPhone image is assigned to all of the selected photos. Repeat this process for each location at which you snapped photos, and you’ll quickly have very accurate (assuming you have an iPhone 3G/3G S, and were in a spot with good GPS coverage) location information for all your snapped photos.

An easy way to get the newest Chromium build

Posted by Rob Griffiths on
0 comments

As I mentioned in my first look at the Chromium browser, its development is proceeding at a rapid pace, with new builds of the open-source project being created multiple times a day—on June 18th, for instance, 25 new builds were posted.

If you’re trying to keep up with development, or even just want to grab a new build once or twice a day, it’s something of a pain to dig through the massive build directory each time you want to upgrade.

Thanks to a shell script from Mac OS X Hints contributor oblahdioblidaa, and a simple Automator application that I wrapped around the shell script, the process has been greatly simplified (though not fully automated).

The following directions apply to OS X 10.5; I’m not sure if they’ll work in OS X 10.4.

Read more …

Set default duration for new iCal events

Posted by Rob Griffiths on
5 comments

One of iCal’s annoyances is that new events are always created with a duration of one hour. There’s no way to change this in iCal’s preferences, and if you prefer 30-minute, 15-minute, or some other period as a default for new events, it’s a pain to change each time. Thanks to Mac OS X Hints reader yesiamnhoj, however, there’s now a relatively easy fix for this problem (though it does require a quick Terminal trip). Note that this solution has only been tested with iCal 3.0.x; I don’t know if it works with earlier versions of iCal.

Quit iCal if it’s running, open Terminal (in Applications -> Utilities), and enter this command, then press Return.

defaults write com.apple.iCal 'Default duration in minutes for new event' 15

Change the 15 to whatever duration you’d prefer to use; it’s specified in minutes. You can even use 0, if you want, to create new events with the same start and end time. You won’t see anything other than the Terminal prompt back when you press Return, but the command will work.

Launch iCal and create a new event, and it should have your specified duration. If, for some reason, you ever want to go back to the one-hour default, the easiest way to do it is to delete the special setting you created. Quit iCal, go back to Terminal, and enter this command:

defaults delete com.apple.iCal 'Default duration in minutes for new event'

When you next launch iCal, new events will be back to their usual one hour duration. Hopefully this becomes a user-settable field in a future iCal release. Until then, though, this is a relatively simple workaround.

Change the Add Bookmark button's location in Safari 4

Posted by Rob Griffiths on
31 comments

One of the new features in Safari 4 is that the URL entry area is now integrated with two additional features—an “add bookmarks” button immediately to the left, and the Google search box on the right. If you hold down the Command key and try to drag the URL bar, you’ll see that all three of these elements drag as one object.

To me, the placement of the button to add a new bookmark is quite odd—by placing it so close to the URL entry area, it’s quite easy to accidentally click the button instead of the URL entry area, leading to an extra click on a Cancel button. If this bothers you as well, there are two related solutions. You can either separate the button from the URL entry area, or remove it entirely.

Both solutions are basically identical in implementation. First, Control-click anywhere on Safari 4’s toolbar and select Customize Toolbar from the pop-up menu. In the sheet that drops down, drag the Add Bookmark button to the toolbar—as soon as this button enters the toolbar region, you’ll notice that the existing button to the left of the URL entry area vanishes.

Drop the button on the toolbar and click Done to dismiss the sheet. If you want to keep the Add Bookmark button, you’re done—you can use Command-drag to move it to a new location on the toolbar, if you wish. If you’d rather not have the Add Bookmark button at all, hold down the Command key and drag the Add Bookmark button down off the toolbar; when you release the mouse, the button will vanish in a puff of smoke (and the attached button won’t reappear).

If you ever decide you want the Add Bookmark button back, you can simply add it through the Customize Toolbar menu again. (You could also drag in the “Add Bookmark, Address, and Search” icons from the Customize Toolbar sheet if you want to get the attached button back. Unfortunately, there’s no way to do this with the search box; it’s permanently associated with the URL entry area.

New E-mail and Internet Reviews

Latest on E-mail and Internet