Mac OS X,  Mass Deployment

Manage Recent Places In OS X

There are two defaults keys that can be used to manage the recent places options in the OS X Finder. Both are in the .GlobalPreferences. The first is NSNavRecentPlaces and the second is NSNavRecentPlacesLimit.

The NSNavRecentPlacesLimit key limits the number of items that are stored in the list. To increase the default to, let’s say, 20, use the defaults command to set the NSNavRecentPlacesLimit key to an integer of 20:

defaults write .GlobalPreferences NSNavRecentPlacesLimit -int 20

Then use defaults to read the setting:

defaults read NSNavRecentPlacesLimit

You’ll need to “killall Finder” in order to see this in a Finder Save dialog. You can also inject items into the RecentPlaces array, called NSNavRecentPlaces, or delete the objects in the array. The array appears as follows:

NSNavRecentPlaces =     (
"~/Desktop",
"/Users",
"~/Desktop/Work",
"~/Documents",
"~/Desktop/Daneel"
);

You can set these using defaults write as well, writing the NSNavRecentPlaces as a list of quoted and comma separated values (note the ‘):

defaults write NSNavRecentPlaces = '("/test","/test2","/test3")';

Or, if you only want to clear the recent places list, delete the key:

defaults delete .GlobalPreferences NSNavRecentPlaces