macdevcenter.com
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button

Mac OS X Power Hound Helpful Hints, Part 2
Pages: 1, 2

Tip 13-23. Force Adobe Help Files to Open in Another Browser

Adobe's help files are factory-set to open in Internet Explorer, one of the oldest and least powerful of the Mac OS X browsers. If you'd rather have the help files open in a more modern browser, there are a couple of ways to do it:

  • The Brute Force Method: This change will affect all files on your hard drive whose names end with .html, so use this method only if that's not a concern to you. (If you design web pages, for example, you may have set .html files to open in BBEdit or Dreamweaver; therefore, this method will eliminate your setting.) In the Finder, open the Photoshop or Photoshop Elements folder, and open the Help folder within it. Click any file whose name ends in .html and select File -> Get Info (Command-I). In the Opens With section, find your browser of choice in the pop-up list, and then click the Change All button. From now on, all HTML files--including the help files--will open in the browser you specified.
  • The Elegant Method: If you'd rather not change your HTML preferences on a system-wide level, you can make just the Adobe help files open in a different browser. The key to this trick is to remove the resource fork that makes the help files open in Internet Explorer. Once you do that, the help files automatically open in your preferred browser.



    The easiest way to remove the resource fork is to install The Grim Ripper, a free program that works in the Finder's shortcut menus. With The Grim Ripper installed, you can select all of the .html files, Control-click them, and be done with the resource forks in one easy step, as shown in the figure above. The Grim Ripper forces you to confirm your actions (unless you downloaded the Extreme version) through a submenu, since resource forks can be critical to a program's correct functioning. In this case, however, the forks aren't needed; they only serve to confuse Mac OS X as to which program should open the .html files.

Tip 14-7. Can a Butler Help You Use Your Computer?

It certainly can help you if it's Butler, the productivity assistant for Mac OS X, that you're talking about. Butler isn't a tool for the faint of heart; due to its power, its configuration interface would probably intimidate even Steve Jobs. However, if you spend a bit of time learning its intricacies, you'll find it combines several separate tools into one useful do-it-all application. In a nutshell, Butler is a program that contains the following: a keyboard program launcher, multiple clipboard utility, Internet search tool, customizable Apple menu, application switcher menu, iTunes keyboard controller, customized pop-up menu, and keyboard macro tool. Amazingly enough, though, the above list is just scratching the surface of Butler's capabilities. For instance, if you use Fast User Switching to toggle among a few users on your machine, you know that you lose some menu bar space for the display of the current user's full name. If your name happens to be Richard Brockenstiltzer Tharnborough III, Esq., it's even worse, as you quickly realize that you don't even have a menu bar any more. Fear not, Richard and other similarly long-named Mac OS X aficionados: Butler makes it possible to recapture that lost menu bar space! As shown in the figure above, you can replace a huge menu bar name with a simple pop-up menu.

Tip: To reclaim Fast User Switching's wasted menu bar space, start by disabling Fast User Switching in System Preferences -> Accounts -> Login Options. Then use Butler to add a new Fast User Switching Smart Item, and assign it a keyboard shortcut (Control-Command-F, perhaps). Now, when you need to switch accounts, just hit your new keyboard shortcut. When you do, you'll see the handy pop-up menu shown in the screenshot above, allowing you to fast user switch without any wasted menu bar real estate.

If you're the ultimate power user and don't mind working through a somewhat complex configuration panel, you may just find that adding a Butler to your Mac is the best productivity improvement out there.

Tip 15-85. Customizing Terminal's Welcome Message

When you open Terminal, it displays a friendly "Welcome to Darwin!" message every time (Darwin is a reference to the particular flavor of Unix that Mac OS X uses). You might prefer to have it say something more meaningful or entertaining, though, like "Cower in Fear, All Ye Who Enter Here." The trick is to edit the file /etc/motd, using the pico editor (or your favorite text editor). Because Mac OS X officially owns this file, however, you're not allowed to edit it--unless you blast past the security by using the sudo command. The complete command, then, is this:

sudo pico /etc/motd

Enter your administrative password when asked. Then replace the stock wording in the file with a message of your choice, and save your changes. Now you can connect to "Tina's Terrific G5 Tower of Terror!" instead of Darwin.

Tip: In today's age of hackers, constant Internet connections, and big litigation over very small things, you may wish to consider a warning message, too. Something like this might do nicely: "This computer system is private. Unauthorized usage is strictly prohibited, and all activity is logged. If you are here by mistake, please close your connection window now." While this message may not do much to stop a hacker, it may be useful if you were to ever reach litigation with someone who had hacked your system.

Tip 16-5. Create a Disk Image from a Directory in the Terminal

Create a Disk Image from a Directory in Terminal Apple's Disk Utility program, located in Applications -> Utilities, lets you create disk images. But to create a disk image from a folder, you need to dig into its menus, which can be an annoyance if you're a true speed demon. Luckily, you can accomplish the same thing from the command line. Here's how you can do so from Terminal, using, as an example, your Sites directory.

  1. First, you need to find out how much disk space the directory holds:

    du -s ~/Sites
    10432 /Users/kirk/Sites

    The du -s command returns the number of sectors for the directory. This information tells you how big the disk image must be. In the above example, there are 10,432 sectors. Add about ten percent to this number to account for metadata; this rounds up to 12,000.

  2. Now, create the disk image file:

    hdiutil create -sectors 12000 -fs HFS+ -volname Sites ~/Sites

    This command creates a disk image called Sites in the current working directory. The disk image is formatted in HFS+ format and has 12,000 sectors.

  3. Next, mount the disk image file:

    hdiutil mount Sites.dmg

    You can check in the Finder to make sure it's mounted on the Desktop.

  4. Copy the contents of the directory to the disk image. Use ditto and the -rsrcFork option to maintain any resource forks that may exist:

    ditto -rsrcFork ~/Sites /Volumes/Sites
  5. Now that you're finished, you can unmount the disk image:

    hdiutil unmount /Volumes/Sites

Note: Although this process takes a few more steps than the method in Disk Utility, you can automate these Terminal commands with a shell script to make things move faster next time. Plus, the command-line method lets you create disk images over a network using ssh.

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 MacDevCenter.com.




0