Safari crashes on launch. Mail quits when you try to send a message. What to do? Most savvy Mac users will delete the application’s preferences file, which stores changes made to the program’s default settings. This creates a new (and hopefully problem-free) copy of the file, with default settings restored, the next time the application is launched. But you can do far more with these files. Editing OS X preferences files (also known as property list or .plist files) unlocks hidden features you can’t access any other way.
Preferences files are plain-text files, so you can view or edit them in any text editor. But because they’re written in XML format, it’s easier to use a utility designed to interpret and format XML—just as using Adobe GoLive to edit HTML files is easier than using TextEdit to do so. Apple’s Property List Editor does the trick (see “Cool tools” on the next page for details). Once you’ve installed it, it’ll be in the Applications folder inside the Developer folder at the root level of your drive.
Sync your bookmarks
The first time you launch Safari, it automatically imports bookmarks from Microsoft Internet Explorer. If you still use Explorer and continue to add bookmarks, at some point you might want to import your updated list. At first glance, you won’t see a way to do this, but appearances are misleading. All you need to do is convince Safari you’re launching it for the first time, and it will import your latest Explorer bookmarks. Safari’s preferences file holds the key.
You can trash the com.apple.Safari.plist file, and Safari will import bookmarks on its next launch. But this also eliminates any other preferences changes you’ve made via Safari’s Preferences command. A more elegant solution is to delete or modify just the right item in the preferences file:
1. Quit Safari if it’s open.
2. Locate com.apple.Safari.plist by selecting Go To Folder from the Finder’s Go menu and entering
~/Library/Preferences. This will take you to the Preferences folder in your Home directory’s Library folder. Double-click on the file to open it in Property List Editor. (If it doesn’t open in Property List Editor, drag the .plist file icon to the Property List Editor icon in the Finder.)
3. In the Property List column, click on the disclosure triangle next to the word Root.
4. Scroll through the items that appear, and find the IEFavoritesWereImported property. (There’s a related one for Netscape called NetscapeAndMozillaFavoritesWereImported, but we’re concerned only with Explorer right now.)
5. Either select the IEFavoritesWereImported property and click on the Delete button, or select the pop-up menu in the Value column of the IEFavoritesWereImported item and change Yes to No.
6. Save your changes and close the document.
The next time you launch Safari, it will import Explorer’s current bookmarks and add the IEFavoritesWereImported property (if you deleted it), with its value set to Yes. If you’ve previously imported bookmarks from Explorer and haven’t deleted them, the newly imported URLs will merge with the existing list.
NOTE: Under some circumstances, a bug makes IEFavoritesWereImported invisible in Property List Editor. If that happens, never fear—open the preferences file in a text editor, such as TextEdit. Look for these lines:
<key>IEFavoritesWereImported</key>
<true/>
Change them to this:
<key>IEFavoritesWereImported</key>
<false/>
Make the Finder anew
Maybe you’re a Unix geek and spend most of your time in Terminal, so you’d like it to replace OS X’s Finder completely, launching whenever the Finder would (at login, for instance). Or perhaps you want to do the same thing with a Finder alternative, such as Cocoatech’s $34 Path Finder utility ( , July 2004 ). A trip to Property List Editor will grant your wish.
1. Select Go To Folder from the Finder’s Go menu and enter
~/Library/Preferences. This will take you to the Preferences folder in your Home directory’s Library folder. Find com.apple.loginwindow.plist and open it in Property List Editor.
2. Click on the triangle next to the word Root.
3. Then, with Root selected, click on the New Child button.
4. A new New Item property will appear. Change its name to Finder.
5. Double-click in the Value column to make the field active. Then enter the absolute path for the application you want to launch. For example, if you wanted Terminal to launch by default, you would type
/Applications/Utilities/Terminal.app.
6. Save your changes and close the document.
To test your change, log out and log back in. When you do so, Terminal should launch. You can still launch the real Finder by clicking on its icon in the Dock. To undo your change, delete the Finder property from the preferences file.
TIP: How do I know about this Finder property if it isn’t present in the default preferences file? Apple revealed its existence on the Apple developer Web site.
Too geeky to use the plain old Finder? Make Terminal launch at login by tweaking the right preferences file. Use Property List Editor to add the highlighted line to your com.apple .loginwindow.plist file.Tweak your hard disk’s sleep
Your preferences are generally your preferences. They’re stored in your Home directory. If another user logs in, the preferences in his or her Home directory become active. But a few settings, such as those made via the Energy Saver preferences pane, aren’t stored in a Home directory and, as a result, remain the same regardless of who logs in. That’s handy if you’re a system administrator and want to make a global change in one fell swoop.
In Panther, you’ll find the Energy Saver preferences in the com.apple.PowerManagement.plist file. Select Go To Folder from the Finder’s Go menu and enter
/Library/Preferences/SystemConfiguration. If you’re using Jaguar, enter
/var/db/SystemConfiguration. You’ll find essentially the same file, but with .xml rather than .plist as the extension.
From the Energy Saver pane, you can access most of the properties listed here, with one exception: the length of time until your hard drive goes to sleep. You can’t set a specific time with a slider, as you can with your display. However, you can work around this limitation:
1. Double-click on the System Preferences icon in the Dock and choose Energy Saver. Select the Put The Hard Disk(s) To Sleep When Possible option. Quit System Preferences.
2. Open the com.apple.PowerManagement.plist file in Property List Editor and click on the disclosure triangles to open Root and then AC Power. (If you’re using a laptop, you’ll see a matching set of properties for Battery Power.)
3. Locate Disk Sleep Timer. Its value (in minutes) should be set to 10. Double-click to edit the value; change it to any value you like, up to 180.
4. Save your change.
Oops. Did you just get a “Couldn’t save document” error message? If so, the root user owns the file, and you don’t have permission to change it. Get Brian R. Hill’s $15 Pseudo utility, which lets an administrative user open an application as the root. Before launching Property List Editor, drag its icon to the Pseudo icon. You’ll be asked for your administrative password. After you give it, Property List Editor will open as before, but you’ll be able to save your change.
Don’t stop now
We’ve just scratched the surface of what you can do with preferences files. Go on your own exploratory adventure: open a selection of .plist files and discover the surprises within, or scan Web pages for tips. Either way, you’ll unlock one of OS X’s hidden powers.
Sidebar: Cool tools
The easy way to edit a preferences file is to use Apple’s Property List Editor. If you purchased a Mac in the last year or so, you probably already have it. Select Go To Folder from the Finder’s Go menu and enter
/Applications/Installers. It’s part of the Mac OS X Developer Tools suite—called Xcode Tools in Panther. (If you bought OS X separately, look for your Developer Tools CD.) Otherwise, download the tools from the Apple Developer Connection site.
[ Ted Landau is the vice president of SPUDOP (Society to Prevent the Unnecessary Deletion of Preferences). He is also the author of Ted Landau’s Mac OS X Help Desk (Peachpit Press, 2004). ]
Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read our affiliate link policy for more details.