I just bought a new aluminum MacBook, and discovered that I couldn't get an IR remote control to pair with the notebook. This is optional, but it prevents other remotes from controlling your Mac.
If you go to the Security System Preferences panel, you'll find a Pair/Unpair button. Clicking on Pair brings up a message instructing you to press and hold the Menu and Next buttons on the remote until a "paired" icon appears.
I tried this several times with no luck. Finally, I found that you have to be running an admin account for this to work -- there is no indication that you can't pair from a non-administrator account. As a matter of fact, the panel is disabled until you click the lock and enter an admin account and password. But even after unlocking, you still can't pair from a standard account.
So if you have trouble pairing a new remote, make sure you log into an admin account first.
Sometimes after switching from one application to another, and then trying to return to the first, I'll find that it won't come forward -- because the first application is doing a long calculation, or something else that makes it freeze. I want to see the current window state for the frozen application, but I can't do it until the program has finished doing whatever it's doing.
For those times when I just can't wait, I think I found the solution: Exposé. Just press F9 (or whatever key you've assigned to All Windows), or move your mouse to the All Windows screen corner, if you've set that up. Then just click on the frozen window, and it should come to the foreground (though it won't update until the long calculation is done).
Other hints, such as this one, describe how to keep an application alive using launchd. problem with this technique is that applications (re-)started this way inherit launchd's environment, not the user's, and so don't include any environment variables defined in ~/.MacOSX/environment.plist
If that's a problem for you (it is for me), then you can include those variables by launching the application indirectly, from a script which parses the environment.plist before invoking the application. Save the script below to a file called LaunchWithToplevelEnvironment.sh (or whatever you like) in ~/Library/LaunchAgents, then make that script executable (chmod a+x script_name):
This is the simplest way I've found to toggle the AirPort card on and off without using third party applications or too many buttons. Hopefully others will appreciate this function as I do. Note: This function is tailored to a MacBook, as the F5 and F6 keys have no predetermined function on these machines. Other machines may need the shortcut keys to be edited.
Create two keyboard shortcuts. Go to the Apple menu » System Preferences » Keyboard & Mouse » Keyboard Shortcuts tab. Click the plus sign at the bottom of the window, and select All Applications from the pop-up menu in the next dialog. In the Menu Title box, type Turn AirPort On with that exact case and spelling. Set the Keyboard Shortcut to F5, then click Add. Click the plus sign again, leave the pop-up menu set to All Applications, and in the Menu Title box, type Turn AirPort Off with the shortcut key also set to F5 -- only one of these functions will be displayed at a time.
In the Keyboard Navigation section of the same window, change the 'Move focus to status menus in the menu bar' to F6 (and check the box to enable this shortcut, if it's not yet enabled).
Make sure the AirPort icon is in your menu bar. Then hold down the Command key and drag the AirPort Menu bar icon as far to the left as possible. This insures that it is the first to be selected when you move focus to the menu bar.
Finally, restart your system.
After your Mac reboots, press F6 to move focus to the menu bar, and F5 to toggle AirPort on or off, depending on its current state.
There are times that it would be nice to automate the creation of PDF files. For example, one might want a workflow to open a file, change some paragraphs, and print to PDF. This would seem a simple thing, but I haven't found a way to script the Print to PDF functionality. However, the Pages app in the iWork suite will do it for you.
As an example, the following AppleScript will use {ages to print to PDF:
Some interesting things to note about the above code. First, the file test3.pdf will be created as a PDF. It seems Pages figures out what you want, and you get a PDF. test2.rtf and test4.txt will be created as RTF and pure text files, which is also useful. However, the file test1.rtf never gets created -- instead, you get a Pages document named test1.rtf.pages. It seems Pages takes the first save as saving the document, then runs the subsequent saves in the proper format. Even if you use the as "rtf" construct in the AppleScript, Pages still saves the file as a Pages document. The workaround here is to have a template document which you open, then do the save into another file:
tell application "Pages"
open file "test6.pages"
set product to front document
set first paragraph of product to "Fee, fii, foo, fum!"
save product in "test6.pdf"
end tell
Of course, all of the above examples save the files at the root directory level -- full AppleScript paths would be needed to put the files where you want. This method is a valuable way to automate the creation of PDF files with the combination of Pages and AppleScript.
When adding a keyboard shortcut to System Preferences (for a menu item for a given application), you sometimes need to add an ellipsis (…) at the end of a menu item's name. A previous hint mentions the need to use the Character Palette to generate this character (or press Option-; on a US keyboard).
Today, I was assigning a keyboard shortcut to an application's menu item, and I kind of forgot to enter the actual ellipsis character, and instead typed three periods. Interestingly, the shortcut worked. I don't know when this was changed (I have written a couple of articles in the past few years about keyboard shortcuts, and always found the need to type the ellipsis character), but it is certainly recent. This saves time and makes it much easier to enter a keyboard shortcut.
While I'm on the subject, I also noticed that the shortcut was active immediately; I didn't need to quit and relaunch the application I set it for. This, too, is a recent change.
[robg adds: The immediate activation of new keyboard shortcuts is a 10.5 addition; I'm not sure about when the ellipsis behavior changed.]
There's a certain amount of spookiness that goes on regarding Apple's FileVault encryption. As everyone knows, it's very difficult to get into anything that's encrypted without the proper keys. But let's assume for a minute that you already have the key via, say, a court order for a suspect in a law enforcement action. Even with the key, however, there's still a lot of ambiguity about just how well the suspect's data (and in particular, deleted data) may be protected.
I've written a brief titled FileVault Imaging: Apple's Dirty Little Secrets that explains exactly how you can mount a FileVault volume (with the key, of course) to obtain the raw disk image. I will also illustrate how deleted data can be preserved inside a FileVault, and how a free space wipe does nothing to purge deleted data from inside one. The protection offered by an encrypted volume seems to aggravate other security issues, possibly making deleted data less secure.
[robg adds: The referenced brief is not about breaking into FileVault volumes, but about how data is stored and managed within those volumes -- in particular, deleted data. The section on the free space wipe was the most interesting to me -- this feature basically doesn't work as intended if you're using FileVault. I haven't tried to confirm that finding for myself, but the provided example seems fairly clear-cut in its proof.]
As of OS X 10.5 at least, dragging a preference pane into the right (Documents) side of the Dock will allow direct access to that preference with a single click. Drag any preference pane from /System » Library » PreferencePanes or /Library » PreferencePanes, and drop it into the dock. Click it, and System Preferences will open with that pane active.
I use this for a connection utility for a wireless USB modem (that has been implemented as a preference rather than an actual app). So I click the pane, then use the Connect button to activate the 3G modem. This is more logical than opening preferences.
This is close to, but not exactly the same, as several previous hints on this topic. I don't know when it became possible, as I only have one Mac and its OS is kept up to date.
[robg adds: The preference panes are now basically like mini applications -- you can place them in the sidebar or toolbar, and if double-clicked in the Finder, that pane will open in System Preferences. For those still running 10.4 or 10.3, can you do this on your Macs? I don't believe this has always been possible, but maybe it has...]
When you start up a Mac holding down the Option key, the boot volume menu appears on the screen -- this shows all bootable volumes on the screen, making it simple to boot from any volume in your Mac.
You can also, it turns out, set the default boot volume (the volume that will boot when you don't hold the Option key down) from this screen. To set the default start-up volume, press Control and click on an arrow under the volume of your choice. When Control is pressed, the upward arrow turns into a circular arrow, denoting the persistence of the choice.
Note that I have tested this on only the newest iMac and MacBook Pro.
[robg adds: This trick did not work on my November 2006 (2.33GHz Core 2 Duo) MacBook Pro.]
When you connect an additional monitor to your Mac, and then drag the Character Palette (opened via the Input Menu icon in the menu bar) to that screen, you may end up in a situation where the Character Palette's top bar is off the top of your Mac's main display after you disconnect the external monitor -- making it impossible to move.
To reset the position of the Character Palette, type killall CharPaletteServer in Terminal, then press Return. The next time you bring up the Character Palette, its position will be reset.