O'Reilly logo

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

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

Viewing and Editing Property Lists

There are two ways you can view and edit the contents of an application’s preferences file:

  • With the Property List Editor (/Developer/Applications)

  • From the command line, using the defaults command

The Property List Editor is only available on your system after installing the Developer Tools; however, the defaults command is available with the base installation of Mac OS X, and doesn’t require you to install any additional software.

Viewing is one thing, but knowing what you can enter into a plist file requires a bit of investigative work. An application asserts its domain through the CFBundleIdentifier key in its internal Info.plist file, which is stored in an application’s /Contents directory. For example, the Info.plist file for the Dock can be found in /System/Library/CoreServices/Dock.app/Contents.

The preferences available to an application are defined via the CFBundleExecutable key in the Info.plist file. Typically, the string for CFBundleExecutable is the short name for the application (e.g., Dock). This executable can be found in an application’s /Contents/MacOS directory. For example, the Dock executable is located in /System/Library/CoreServices/Dock.app/Contents/MacOS.

To see a listing of available keys and strings for an application, use the strings command in the Terminal, followed by the path to the application’s short name as defined by CFBundleExecutable:

chuck% strings /System/Library/CoreServices/Dock.app/Contents/MacOS/Dock ...

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