Best way to find plist properties to edit?

thestardawg
New Contributor

Hi!

I was curious if there is a good way to go about finding the .plist files that have the arguments I would use to change the way the OS behaves.

Example: I'd like a shell script to autoset the scrollbars to always on boot. I can write the script just don't know how / what to look for!

Thanks,

2 REPLIES 2

Josh_S
Contributor III

I usually start by determining if the settings I want to change are system-wide or on the user level. I then look for a plist named something like "com.companyname.applicationname" in either /Library/Preferences/ or ~/Library/Preferences/, take a peek in the ByHost folder as well. Open it up with TextWrangler, or your plist editor of choice, and see if any of the preferences are obvious for what I want to control.

If I can't find the preference file at all, or just have no idea which preference controls the functionality that I'm looking for, I open up Composer and do a "New & Modified Snapshot", change the setting I'm trying for, and then finalize my Composer package to see which files were changed. Once you know the file and can't find the setting, you can made a duplicate plist and then change the setting. Open up the before and after plists and, using TextWrangler again, search for differences to pinpoint the actual preference.

Some applications are more difficult than others, but this will get you started for 98%* of the settings you need to change.

* Completely made up on the spot.

mm2270
Legendary Contributor III

Well, outside of Google searches, which nearly always point you in the right direction, another method, if you have access to Composer, is to do a snapshot of before/after making the changes, and seeing what gets captured. Not to deploy it that way, but just to examine what files get added or changed when making adjustments in the GUI. I use this method most times and it usually works.

You could also use something like fseventer to monitor all the files being changed during modifications, but you often get too much information with fseventer, so it may not be the best approach.
http://www.fernlightning.com/doku.php?id=software:fseventer:start

Lastly, you can try using the following command in Terminal. It shows all preference files that are being modified as you work, but, similar to fseventer, you end up seeing a lot of entries because the OS is constantly writing changes to plist files with nearly everything you do. But it can be useful anyway.

sudo opensnoop -n cfprefsd