Preference File is Not XML

0

I want to modify this file, following PathFinder's instructions

/Library/Preferences/com.apple.loginwindow.plist

however, it's not XML whatsoever. Looks more like some binary format.

What am I missing?

Here are the instructions from the PathFinder manual

If you’re feeling more geeky, edit the preference file com.apple.loginwindow.plist and add the following lines:

<key>Finder</key>  <string>/[path to]/Path Finder.app</string>

Dan Rosenstark

Posted 2009-11-20T12:43:46.973

Reputation: 5 718

Answers

2

Apple has switched to using binary formatted preferences, it's the same format, just represented in a "compressed" binary format, instead of "human readable".

To convert a binary .plist file to XML format for editing, type this in the Terminal: plutil -convert xml1 some_file.plist

To convert an XML .plist file to binary for use: plutil -convert binary1 some_other_file.plist

Benjamin Schollnick

Posted 2009-11-20T12:43:46.973

Reputation: 4 313

Perfect. Someone that seems scarier, but it is, in fact, safer all around. – Dan Rosenstark – 2009-11-20T14:13:47.980

1It's usually easier to just use an actual Property List editor that can handle all three supported formats. – Hasaan Chop – 2009-11-20T18:52:10.093

1

While Benjamin's answer is indeed correct and does answer your question, I would suggest that the "safer" way to tweak preferences is to use the defaults command. Such as

$ sudo defaults write /Library/Preferences/loginwindow Finder "/path/to/Path Finder.app"

Then you don't need to worry whether the plist is binary or XML.

Steve Folly

Posted 2009-11-20T12:43:46.973

Reputation: 5 293

Wow +1... man I thought I could avoid learning all this stuff, but apparently not. – Dan Rosenstark – 2009-11-21T02:22:24.887