Rob's Top Mac OS X Hints, Part 1by Rob Griffiths, coauthor of Mac OS X Hints, Jaguar Edition
Editor's Note -- Rob Griffiths has published more than 3,500 Mac OS X tips on his Mac OS X Hints site, much to the delight of this editor and thousands of Mac OS X fans. Here at O'Reilly we were pleased that Rob agreed to write Mac OS X Hints, Jaguar Edition for us because we knew that the book would be a big hit with our audience. Just to give you a taste of what Rob has been working on, he's pulled together 16 of his favorite hints to share with Mac DevCenter readers. This week we're publishing the first eight, followed by round two next week. Enjoy!
The following selection of 16 hints (one per chapter) from my Mac OS X Hints: Jaguar Edition was supposed to be a list of my "favorite" hints. However, I quickly figured out that I have way too many "favorite" hints! With over 3,500 hints in the database, it was tough enough picking the 550 or so best tips for the book. Narrowing that down further to my 16 favorites turned out to be impossible. So instead of my favorites, here's a list of hints (one from each chapter) that I find particularly useful or interesting--you're, of course, free to agree or disagree.
A few of these hints reference other pages or hints in the book, but the hints are still usable and understandable without the external references. In some cases, I modestly rewrote a hint when necessary to stand on its own. New color screenshots were taken, so they may differ slightly from the images in the actual book, though the action depicted in each screenshot will be identical.
Hint 1-5: The Login Screen "Billboard"
In case you've been lying awake wondering how to add a line of customized text to your login window, help is at hand. Maybe you work somewhere that requires a disclaimer on the usage of computing resources. Or maybe you want to add a touch of personalization to your login window: a daily reminder to back up your hard drive or floss, for example.
Adding this line of text entails editing a special preference file, which is a running theme in the Mac OS X hacking community, as well as in Mac OS X Hints.
In the Finder, open the Library -> Preferences folder. Inside you'll
find a file called
com.apple.loginwindow.plist. To edit it,
open it using TextEdit. The file contains a long list of bracketed words
known to programmers as tags. Just below the first
<dict> tag, insert these two lines:
<key>LoginwindowText</key> <string>Your text goes here</string>
Replace Your text goes here with whatever you'd like displayed on the login window screen.
Choose File -> Save. When TextEdit tells you, "Couldn't save document because the file is read-only. Attempt to overwrite?", click Overwrite. The next time you log in, you'll savor the results of your modification.
Hint 2-47: A System-Wide, Spring-Loaded Toolbar Icon
Now that you're a believer in spring-loaded folders, you're probably wondering why the Computer icon on the Finder's toolbar is not spring-loaded like its compatriots. It'd be handy if this icon were spring-loaded, because then you could drag-and-hold icons onto it to reach every drive, partition, and network on your machine. Here's a way to simulate that feature:
In the Finder, choose Go -> Go To Folder (or press Shift-Command-G). In a dialog box, type
/Volumesand press Enter. A semitransparent Volumes folder appears in the Finder window. (The transparency tells you that you've opened a folder that is ordinarily hidden.) The Volumes folder contains almost all of your hard drives, partitions, and any CD or DVD players. What it does not contain, however, is your Mac OS X startup drive (Macintosh HD, for example).
While pressing Command and Option, drag your Macintosh HD icon into the Volumes window. As you know from hint 2-34, Command-Option-dragging an icon creates an alias of it. You've just made the Volumes window, in effect, a duplicate of the Computer window, because it now contains icons for all of your drives, including the startup drive.
Now Command-Option-drag the Volumes folder onto your desktop, creating an alias of it. The easiest way to do this is to drag the tiny folder in the title bar of the Volumes window (next to the word Volumes)--the folder proxy icon, as it's called. Once you've created an alias of the Volumes folder, rename the alias something pleasing (Computer, for example), paste on a custom icon if you wish (hint 2-18), and then move it somewhere you're not likely to delete it (your Documents folder, for instance).
Drag the new Computer alias to the toolbar, where it's ready and waiting to help you navigate your hard drive in a hurry (see Figure 2 below showing the icon on the toolbar about to spring open). From now on, you can file icons by dragging them onto this Computer icon and using spring-loaded folders to reach any spot on your system:
Hint 3-9: Differentiating Hidden Programs
Pressing Command-H (or choosing the Hide command from the menu that bears the frontmost program's name) is all well and good: it makes all the windows of the program invisible to get them out of your way. Even when you do that, however, its Dock icon remains fully visible, oblivious to the fact that the program has now been hidden. The result for you is confusion, since it's now harder to remember which programs you've hidden.
With a small settings tweak, however, you can have the Dock display hidden programs with a semi-transparent icon and triangle, as shown in Figure 3. Note the semi-transparent icons for Mail and Terminal, indicating that they are hidden:
To implement this change, open Terminal. At the % prompt, type this:
defaults write com.apple.Dock showhidden -bool yes
Now press Enter. To trigger your change, quit the Dock using Process
Viewer, as described in hint 3-6. To return to the normal look for all
icons, repeat the above command but replace
no. Quit and restart the Dock.
Hint 4-33: A Separate Account for Troubleshooting
One of Mac OS X's most useful troubleshooting features is its multiuser capacity. If you're having trouble with some element of the system, and the previous hint didn't resolve it, the next step is to create a new "troubleshooting-only" account.
Open System Preferences, click Accounts, and on the Users tab, click New User. Fill in the dialog box that opens, and give the account a useful name like "Test Account" or "Save My Bacon." At the bottom of the dialog box, turn on "Allow user to administer this computer" to make sure your test account has full system-management powers. Click OK to create the account.
Now log out of your Normal account, and log in as the test user. Try to recreate the problem you were experiencing before. If you can't make it happen again, then you've narrowed the problem down to something within your Normal account. If, on the other hand, the problem persists, you know you've got some sort of system-level problem, and it may be time to call in the experts (Apple Support, your favorite troubleshooting Web site, or an ultrageeky friend).
Note: Don't use your test account for normal computing, and don't install any hacks or nonstandard system modifications on that account. You want to keep it as close as possible to the original, from-the-factory setup..
Hint 5-18: Keyboard Power in Windows and Dialog Boxes
If the full keyboard access feature described in hint 5-17 in the book displeases your fingertips, the Keyboard preference panel has a compromise setting.
Open System Preferences -> Keyboard; at the bottom of the Full Keyboard Access tab, find the section labeled "For windows and dialogs, highlight." If you turn on "Any control," you can use the keyboard to reach everything in windows and dialog boxes (see Figure 4).
For example, you can press Tab to move the "focus" (a subtle highlighting) through controls like pop-up menus, buttons, and dialog boxes. The up and down arrow keys navigate menus; the right and left arrows move you through submenus and subfolders; Enter is like clicking a chosen command; Esc gets you out.
Hint 6-11: Monitoring File-Sharing Activity
If you suspect a hacker is infiltrating your machine, or if you've setup Personal File Sharing and you're just curious about who's using it, you might want to track file sharing activity. This hint tells you how to turn on Mac OS X's secret activity monitor.
Open NetInfo Manager (a program in your Applications -> Utilities folder). Click the padlock icon in the lower-left corner of the NetInfo Manager window. When prompted, enter your administrator's password and press Enter. The system asks for your password to make sure that you are an administrator--somebody with the necessary authorization and expertise to mess around with important system settings in NetInfo Manager.
Tip: Indeed, it's a good idea to back up your settings before modifying any NetInfo Manager data, using the program's built-in backup feature. Choose Management -> Save Backup.
In the upper NetInfo window, click Config; in the right column, click AppleFileServer. As you can see in Figure 5, working with Mac OS X system settings in NetInfo Manager is something like working with nested folders in the Finder's column view. When you click the name of a feature in the rightmost column, you see a scrolling list of its parameters in the lower pane:
In the lower window, scroll down until you see "activity_log" on the left-hand side. It should have a 0 next to it, meaning "this feature is turned off."
Click the 0 and change it to 1, as highlighted in the above screenshot.
Save your changes by choosing Domain -> Save Changes, or by pressing Command-S. Then quit NetInfo Manager. You've just flipped the master switch to turn the activity monitor on.
Open System Preferences, click the Sharing icon, and turn off File Sharing (if it was already running). Then turn it back on.
You now have a tool that tracks file-sharing activity as it occurs, by
writing it out in little text files known as logs. You can find the logs
by opening your machine's /Library -> Logs -> AppleFileService
folder; inside is the text file called
AppleFileServiceAccess.log. You can, of course, read these
logs using a word processor.
However, one of the most convenient ways to read them is through the program called Console (in Applications -> Utilities). Once you've opened this program, choose File -> Open Log, and then navigate to and open the log file. A window opens that lets you watch in real time as the system tracks activity on your file server.
Note: If you ever want to disable logging, just run NetInfo Manager, switch 1 back to 0, save your changes, and restart File Sharing.
Hint 7-5: Intelligent Searches
Mail's Search function lets you track down a certain message in either the currently selected folder or in all of your folders. Searching is easy if you're looking for a one-word term like "anniversary" or "platypus." But what if you want to find a reference to "dog food"? If you type that phrase in the search box without any quotation marks or other characters, Mail finds all messages that contain either "dog" or "food." You get back a slew of messages about appointments with the vet and restaurants you've tried, but you may not spot the one recommending a particularly nutritious kibble.
To force Mail to search the entire phrase, put quotes around it. If you type "dog food," for example, the program will look only for messages that contain both words. You can get even fancier and use and, or, and not to limit searches. If you search for golf and (par or birdie), for example, Mail looks for messages that contain the word "golf" and either "par" or "birdie." Similarly, if you search for lunch not (free or cheap), Mail returns only messages that discuss expensive lunches.
Note: For more information on advanced searches, check out Mail's Help files.
Hint 8-28: Moving Songs to the Top of a Playlist
You've just created the playlist for a weekend-long bash, but it's not yet in any order. As you prepare for the shindig, you realize that you'd like many of the songs near the bottom of the list to play first. At first glance, you might suppose that the only way to move them up your gigantic music list is to drag them toward the top of the iTunes window, wait for the long list of songs to scroll by, and then drop the selections at the top. Fortunately, there's a better way.
Note: The following trick works only within a playlist, not within your entire library.
Select all the songs you want to move (Command-click to select individual, nonadjacent songs in the list). But instead of dragging them, drag the handle of the scroll bar toward the top of the window. Scan the list for a song near where you want the selected songs to wind up. Then Command-click this new "top song" to temporarily add it to your selection. Now--and this gets a little weird--click the song you just selected and keep the mouse button down. Now wiggle the mouse around. If you move it just enough, the horizontal insertion indicator appears without actually moving the file.
Move the insertion line back to the spot where you grabbed this top song and then release the mouse button. Almost like magic, the top song drops into place along with all of your selections from the bottom of the list just beneath.
If you're still hungry for more tips, there's good news for you. Next Tuesday we'll publish the second batch or Rob's favorite hints. Be sure to stop by for a look.
O'Reilly & Associates recently released (April 2003) Mac OS X Hints, Jaguar Edition.
Sample Chapter 3, The Dock, is available free online.
For more information, or to order the book, click here.
Return to the Mac DevCenter.
Pining the dock
2005-02-24 10:49:38 b12 [View]
- Trackback from http://www.saffan.com/archives/000018.html
2004-02-02 20:18:52 [View]
2003-05-30 19:36:04 anonymous2 [View]
2003-06-04 08:48:46 anonymous2 [View]
RE: Wow (The Book is Out)
2003-06-01 19:15:29 Derrick Story | [View]