O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. The Defaults System

Native Mac OS X applications store their preferences in the defaults database . This is made up of each application's property list (plist) file, which is an XML file consisting of key/value pairs that define the preferences for an application or service of the operating system.

If an application has a plist file, every time you change its preferences, the changes are saved back to the plist file. Also included in the defaults database system are the changes you make to your system via the panels found in System Preferences (/Applications).

As an administrator, you may need to access your or another user's preferences. This is done from the Terminal using the defaults command. This chapter covers Mac OS X's preferences system, including the format and location of application and system preference files, how they work, and how to view and adjust their settings using the Property List Editor (/Developer/Applications/Utilities) and the Terminal.

Property Lists

User-defined property lists are stored in ~/Library/Preferences, and the appropriate plist is called up when an application launches. Property lists can contain literal preferences set through the application's ApplicationPreferences dialog, or subtler things such as window coordinates or the state of an option (such as whether to display the battery menu extra in the menu bar, as shown in Example 13-1).

Example 13-1. The com.apple.menuextra.battery.plist file in XML format

<?xml version="1.0" encoding="UTF-8"?> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required