Defaults
In MacOS X preferences are stored in XML like files called plists. These
are text based and human readible. Apple has an application called PropertyListEditor
which installs with the developer tools. This is a GUI representation
of the plist and is pretty nice for reading and editing plist files. But
not everybody installs the developer tools and if you do you have to know
there these plist files are stored. Therefore Apple created a little useful
command line tool called defaults which lets you read and write
these plist files. To use this you have to launch the Terminal
application. This is located in the Utilities folder under Applications.
This application lets you play with the Unix underpinnings which is the
heart of MacOS X.
Only applications which uses the built-in API in MacOS X for preferences
will be available with the defaults tool.
To use the defaults tool you need to know some basic commands. Write
these in the Terminal window and hit Enter after the command.
defaults domains
This lists all applications/domains which has registered preferences in
the defaults system.
defaults read <application/domain, ex com.apple.finder>
This lists all settings for the specified application/domain (the <>
characters are not supposed to be included).
defaults write <application/domain, ex com.apple.com> <setting/key,
ex FileViewer.Toolbar> <value, ex 0 or 1>
This changes the value for a specific setting for the defined application/domain.
The value is often a boolean value (1 or 0) but it could also be a string
or a number or a list of other values. (You can write "-boolean yes"
instead of 1 or "-boolean no" instead of 0). You need to restart
the changed application to see the changes.
defaults domains | defaults read
Gives a list of all the default settings.
You are now ready to change the look and feel of MacOS X. A lot of these
settings are available through the UI, like the System Preferences
application. But there are a lot of settings which are not obvious, you
don't see them when you use the defaults read command. You can find these
"hidden" setting by searching for strings in the application
packages. This is teadious work and therefore we list the most useful
ones here.
Defaults commands
- defaults write NSGlobalDomain AppleScreenShotFormat <JPEG or TIFF
or PNG or PICT>
- defaults write "Apple Global Domain" AppleScrollBarVariant
<DoubleBoth or Single or DoubleMax>
- defaults write CoreGraphics CGFontDisableAntialiasing <YES or NO>
- defaults write NSGlobalDomain
NSInterfaceStyle <nextstepdefaults or macintoshdefaults or windowsdefaults>
- write com.apple.finder Desktop.HasLocalVolumes
<1 or 0>
- defaults write com.apple.finder
Desktop.HasTrash <1 or 0>
- defaults write com.apple.terminal
TerminalOpaqueness <0.0 to 1.0>
- defaults write com.apple.finder
ZoomRects -bool <yes or no>
- defaults write com.apple.finder
DesktopViewOptions -dict ArrangeBy <dnam or kind or size>
- defaults write com.apple.dock
showhidden -boolean <yes or no>
- defaults write com.apple.dock
showforeground -boolean <yes or no>
- defaults write NSGlobalDomain
NSFixedPitchFontSize <size, ex 14>
- defaults write NSGlobalDomain
NSFontSize <size, ex 14>
- defaults write NSGlobalDomain
NSSystemFontSize <size, ex 14>
- defaults write com.apple.finder
Desktop.HasDarkDesktop <1 or 0>
- defaults write com.apple.finder
Desktop.HasRemovableMedia <1 or 0>
- defaults write com.apple.finder
OpenWindowForNewRemovableDisk <1 or 0>
- no new window when you insert disk
- defaults write com.apple.finder
CreateDesktop 0
- no desktop pic
- defaults write com.apple.dock
showforeground 1
-the little triangle under the dock icon of the active application is
painted blue (incontrast to triangles of applications in the background
which color remains black)
- defaults write com.apple.dock
showhidden 1
- the dock icons (and the corresponding triangles underneath) of hidden
applications are dimmed (it looks like disabled buttons, but they're
still clickable)
- defaults write com.apple.finder
ShowAllFiles True
- defaults write NSGlobalDomain
Desktop.HasDarkBackground <1 or 0>
- defaults write com.apple.Dock mineffect <genie or suck or scale>
- defaults write com.apple.Dock showshadow <any value>
- defaults write NSGlobalDomain AppleSmoothFontsSizeThreshold <point
size>
(The < and > characters are not supossed to be included in the
final command)
Other useful tips