Change plist and make it stick

plistsafari

I'm sure I can get into all sorts of trouble by doing this, but that's what this site is all about right?

I found a key in ~/Library/Preferences/com.apple.Safari.plist called TopSitesGridArrangement which, is connected to the "Top Sites Show" Safari preference which allows you to choose 24, 12, or 6 Top Sites at a time. When you set the preference to 24 the plist value is changed to 2 and so on with 12 –> 1, and 6 –> 0.

I want to be able to do this in reverse i.e. change the plist and make Safari respect the change. The problem is, when doing it this way, Safari always remembers what it was last and overrides the change you made in the plist. Anyone know how to hack this? I plan on modifying this file through a python script if anyone was curious.

Best Answer

Well that was quick, I found the answer. Apparently in Mavericks the OS caches the preferences so you have to read them out after you change them. In my case I opened Terminal and typed defaults read com.apple.Safari

Read this article for more info