Originally Posted By: ganbustein
Instead, the simplest option is probably to just paste it in. I've shown you above what the contents of the file should be. Copy that, then execute the command:

pbpaste > ~/Library/Preferences/com.apple.Finder.plist

and now you have it in your preferences folder. Follow the previous instructions to put it where it belongs in LaunchAgents.


I belatedly realized there's a bit of a Catch-22 in that. If you've been following standard operating procedure, which is to copy/paste commands from your browser into Terminal to avoid transcription errors, then what you have on the clipboard, and what the pbpaste command is going to produce, is the pbpaste command itself and not the desired contents of the .plist file.

What you need to do is copy/paste the pbpaste command but leave off the trailing newline character so it doesn't execute yet, then go back to your browser and copy the data that's to go into the file, and finally return to Terminal and press the return key.

If you've accidentally executed the pbpaste command already, it's easy to recover. Go back and copy the data again, then in Terminal press the up-arrow key to get the previous command back, and press return to execute it.

Or just type the pbpaste command very carefully.

Or, use cat instead of pbpaste. Execute the command:

cat > ~/Library/Preferences/com.apple.Finder.plist

(note the > character which is not in command you use to view the file). At this point, whatever you type will go directly into the file, replacing whatever is already there, if anything. Use copy/paste from your browser to Terminal to copy the data, then press control-D in Terminal to indicate you're done typing.

However you do it, check the contents of the file to make sure it's correct before moving it into /System/Library/LaunchAgents. As before, the command to see what's in the file is:

cat ~/Library/Preferences/com.apple.Finder.plist

(without the > character).