Skip to Content
Mac OS X in a Nutshell
book

Mac OS X in a Nutshell

by Jason McIntosh, Chuck Toporek, Chris Stone
January 2003
Intermediate to advanced
832 pages
32h 40m
English
O'Reilly Media, Inc.
Content preview from Mac OS X in a Nutshell

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mac OS X Internals: A Systems Approach

Mac OS X Internals: A Systems Approach

Amit Singh
C++ In a Nutshell

C++ In a Nutshell

Ray Lischner
Linux Shell Scripting Cookbook - Third Edition

Linux Shell Scripting Cookbook - Third Edition

Clif Flynt, Sarath Lakshman, Shantanu Tushar
Optimized C++

Optimized C++

Kurt Guntheroth

Publisher Resources

ISBN: 0596003706Supplemental ContentCatalog PageErrata