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/Utilities
)From the command line, using the
defaults
command
The Property List Editor is available on your system only after
installing the Xcode 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; e.g., 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
:
$ strings /System/Library/CoreServices/Dock.app/Contents/MacOS/Dock
Unfortunately, ...
Get Mac OS X Panther in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.