Latest Posts in Mac OS X Hints

Use a command-line AirPort tool

Posted by Rob Griffiths on
3 comments

As you may (or may not) be aware, Apple often includes command line versions of its applications—so for many things you can do in the GUI, you’ll find there’s a command line equivalent. Off the top of my head, for instance, there’s screencapture (for grabbing screenshots), system_profiler (aka System Profiler), and (in 10.5, anyway) networksetup (System Preferences’ Network panel). Today, we’ll add one more to the list—airport, for controlling your machine’s AirPort connections from Terminal.

While Apple provides a couple of GUI methods for working with AirPort connections (the AirPort Networking System Preferences panel and the AirPort menu bar icon), sometimes it’s nice to have a command-line alternative.

Unlike the other examples on my list, the airport command is pretty well buried; to find it, you’d have to navigate to the top-level /System -> Library -> PrivateFrameworks -> Apple80211.framework -> Versions -> A -> Resources folder. Since that’s a real pain to do every time you want to use the program, here’s a simpler solution: we’ll create an alias to the command (basically much like an alias in the Finder) in your user’s .profile file (located in your user’s home directory) to make it simple to access. (You Unix-savvy types could alternatively create a symbolic link somewhere on your path, but I’ll leave that as an exercise for the reader.)

Gain full keyboard and mouse control in 10.5’s screen sharing

Posted by Rob Griffiths on
2 comments

One of the things I really like about OS X 10.5 is the built-in screen sharing tool. With multiple machines in our home, screen sharing has greatly eased the task of managing all these machines. When I need to do something on one of our other Macs, I just connect to it via screen sharing, do what I need to do, and then close the screen sharing session.

This works great, for 99 percent of the stuff I need to do. But sometimes I’ll find myself frustrated by the way the keyboard behaves in screen sharing mode. For the most part, what you type is interpreted by the remote Mac, which makes sense. If you, for instance, copy (Command-C) or paste (Command-V), those commands affect the remote Mac, not your local machine. There are some key combinations, though, that are captured by the local machine, such that the remote Mac never sees them.

(Note that today’s hint is longer than usual, though it’s not overly complicated. The subject matter is also something I covered in a Macworld Video, but I think it’s useful enough to share here in text form. If you’d prefer to see the video version, download the Working with multiple Macs video, and skip forward to about the 7:35 mark. If you prefer the text version, keep reading.)

A copy-and-paste tip for Keynote slide groups

Posted by Rob Griffiths on
0 comments

If you’re a Keynote user, you probably know you can group slides together, which is a great way to keep the various pieces of your presentation separated. To create a group, you just decide which slide you’d like to have as the first slide in the group—typically, this would be the slide that introduces that particular section of your talk. You then select any number of following slides, and either drag-and-drop them onto this first slide, or just press Tab (Shift-Tab to ungroup).

This is one of Keynote’s nicer features, especially if you’re working on, for instance, a 90-minute-long “Best of Mac OS X Hints” presentation for Macworld Expo—instead of dealing with perhaps a hundred different slides, I can deal with maybe 10 groups of 10 slides each, expanding only the group I’m currently working with.

image
Once grouped, you can use the black disclosure triangle to the left of the first slide in the group to show or hide the additional slides in that group, as seen in the image at right.

Ease the Safari-to-iTunes lyric pasting task

Posted by Rob Griffiths on
12 comments

If you enjoy having lyrics with your music in iTunes, you’re probably familiar with the tools available to collect those lyrics. These tools include the wonderful (but sadly, no longer available) PearLyrics and SingThatiTune (and probably others I’m not aware of—feel free to list your favorites in the comments). But what happens if those tools fail to find the lyrics for a given song? Then you’re on your own, and you must head out into the world wide weird, er, web, to sate your lyrical needs—Google is your friend here, obviously.

But once you’ve found the lyrics for the particular song, you then have to get those lyrics into iTunes, which requires some keyboard and/or mouse exercise. If the song in question is still playing, you can actually do this by using a series of keyboard shortcuts.

Start by selecting the lyrics on the web page, then press: Command-C (copy the lyrics), Command-Tab and switch to iTunes, Command-L (select active track), Command-I (open Get Info window), Command-6 (select Lyrics tab), Command-V (paste lyrics), and finally, press Enter on the numeric keypad to accept the changes and close the Info window. Of course, if the song you were trying to find lyrics for has ended, the process is trickier—you’ll have to manually find its entry in iTunes before following the rest of the keyboard shortcuts.

Permanently delete Mail messages

Posted by Rob Griffiths on
7 comments

If you’re a Mail user, you probably know at least a couple ways to delete messages—there’s the mouse-intensive “drag to trash folder,” or you can use the menu (Edit -> Delete), or the keyboard shortcut (Command-Delete). Of these three, Command-Delete is my most-used method, as it’s fast and keeps my hands on the keyboard.

The one downside—at least in certain cases—to all these methods is that they move the deleted message to the trash folder. Generally, this is a good thing, because it gives you a fallback in case you make a mistake. But what if you’re emptying out a spam-trapping folder, or a folder of ancient messages, and you know you don’t want to keep them in the trash?

If that’s the case, select the message (or multiple messages), then press Command-X (or use Edit -> Cut in the menu). This will cut the messages from the folder, as would happen in any text editor with a selection of text. If you like, you can use Cut as expected—select a new mailbox and press Command-V (or Edit -> Paste), and the cut messages will be pasted in the new folder. However, if you do nothing else, the cut messages will simply vanish—as soon as you put anything else on the clipboard, those cut messages are gone for good.

Create a visual catalog of settings and error messages

Posted by Rob Griffiths on
4 comments

Today’s hint is a fairly basic one, but one that you may find quite useful when you have a system issue, need to set up a new machine, or otherwise need to remember something that happened on your current machine. For instance, maybe you need to replace the router that sits between your high-speed Internet connection and your home network. Or perhaps you’re debugging an issue with one of your e-mail accounts, and you’d like to delete it and start over. In both of these cases—and many other situations—the process is made much simpler if you have a record of the current settings for the program or device that you’re working with. In the case of the router replacement, for instance, there are probably pages of settings you’ve tweaked, all of which will need to be set again once you install the new router. In the case of the e-mail account, there are similar details for account name, passwords, SMTP server settings, and much more.

You could, of course, write all of this information down using an old-fashioned paper and pencil. Or you could type it all into your favorite text editor. But both methods are tedious compared to what I find to be the simplest solution: screenshots. As you’re probably aware, the Mac has a number of built-in screenshot options—Shift-Command-3 will capture the entire screen, Shift-Command-4 will capture a dragged region, and pressing the Space Bar after pressing Shift-Command-4 turns the region capture icon into a camera, which will capture the window behind the mouse pointer when you click the mouse button. Using these tools, it’s easy to capture screen after screen of settings—just bring up the page that displays the details you’re interested in, then capture that information using the screenshot tools. I usually use either the region-capture or window-capture methods, as I rarely need to see the entire screen.

What do you do with these screenshots after you’ve captured them, though? Sure, you could just toss them in a Finder folder, but why not take advantage of another Mac program to help with the storage of all these images? Instead of using the Finder, drop them into iPhoto, and create a special album just for such screenshots. This will keep all your setup-related screenshots together in one spot, and you can use iPhoto’s keywords to further organize them—add Finder to Finder-related screenshots, e-mail for e-mail related shots, etc.

Set up a basic workgroup file server the simple way

Posted by Kirk McElhearn on
9 comments

For Mac users in small businesses, or even on home networks, one issue arises when they want to find an efficient way to share files—how to set up a Mac as a shared file server for a workgroup so that multiple users can create, modify, and delete files and folders on that machine. The geekier readers know about permissions issues related to users modifying files and folders created by other users, setting up accounts for users and groups, or even, under Mac OS X 10.5, setting up sharing only accounts.

But when you think about it, in many environments, there’s no need to use a complicated solution when a simple one might be sufficient. On the machine that you want to use as the shared file server (it could be a standalone Mac or even another user’s Mac if the group is small and the workload not too heavy), create a new non-administrative account (name it Workgroup, Family or whatever). Login to the new account, and create the folder structure you’d like the users to see, and copy any files to the server that the users will need to access.

As the last step, share the login name and password for that account with the users in the workgroup. Set up each member of the workgroup to connect to the shared Mac using the special shared account, and you won’t have any permissions issues at all: since everyone will be logged in as the same user, everyone will be able to create, delete, and modify files at will.

Search for iTunes music by star rating

Posted by Kirk McElhearn on
0 comments

You probably know that you can use smart playlists in iTunes to filter your music. Say you want to find all your 5-star Grateful Dead songs; just create a Smart Playlist where Artist Is Grateful Dead, and Rating Is *****. You’ll get a list of all those songs.

But sometimes you may simply want to find a song in your library using rating information, and don’t want to make a playlist. All you need to do is type the name of a song, artist or album in the Search box, then type the number of stars (using asterisks or Shift-8) you want to use as a baseline. (iTunes runs a “greater than or equal to” search for the number of stars you put in the search field.)

View inline PDFs in Firefox 3

Posted by Kirk McElhearn on
13 comments

If you're using Firefox 3 to browse the Web, you may have noticed that it's missing one essential feature (for many) that you can find in Safari: you can't view PDFs in a browser window. When you click a link for a PDF file, Firefox 3 downloads the file, forcing you to then open it in Preview or Adobe Acrobat Reader.

Well, there’s now a Firefox extension named firefox-mac-pdf, available for Firefox 3 that utilizes the built-in PDF support in OS X to display PDFs in the browser.

This extension doesn't have the nifty fading bezel that the Safari PDF viewer does, but it supports all the same keyboard shortcuts and you get the standard Mac OS X PDF contextual menu when you control-click on a displayed PDF.

Use an AppleScript to force a desktop picture change

Posted by Kirk McElhearn on
1 comment

You may use the Mac OS X feature in the Desktop preferences to have your desktop images set to change every N minutes in random order. Sometimes the desktop will display an image that displayed earlier in the day, and you may want to skip over that image easily. The following AppleScript will cause the desktop image to change, in whatever order you have set, each time it is run. (The script assumes that you have set the picture to change every 30 minutes).

property theSwitch : 0
if theSwitch = 0 then
  tell application "System Events"
    tell current desktop
      set change interval to 1801.0
    end tell
  end tell
  set theSwitch to 1
else
  tell application "System Events"
    tell current desktop
      set change interval to 1800.0
    end tell
  end tell
  set theSwitch to 0
end if

To maintain your current change interval, modify the change interval lines to reflect your interval, measured in seconds. Thus, for a 30-minute setting, you use 1801 and 1800 seconds. One hour would be 3601 and 3600, etc. For this script to work, you must have both Change Picture and Random Order enabled on the Desktop tab of the Desktop & Screen Saver System Preferences panel.

You can save the script as an application and leave it somewhere accessible so you can run it with a double-click.

Name   City
 
Address 1   State   Zip
   
Address 2   E-mail (optional)
 

New Networking Reviews

Macworld Resource Centers

Latest on Networking