Feb 04, '10 07:30:00AM • Contributed by: ruggix
I use the following method to automatically clean, at shut down time, the entries in the Finder's Go » Recent Folders menu entry. It cost me some work, but eventually it worked. Open Terminal and do the following:
$ cd /etc/ $ sudo nano rc.shutdown.localWhen prompted, enter your admin password. In the nano editor, add the following lines (assuming the file doesn't yet exist):
#!/bin/bash cd /Users/your_user/Library/Preferences/ defaults delete /Users/your_user/Library/Preferences/com.apple.finder FXRecentFolders chown your_user:your_group com.apple.finder.plist
The chown command is needed because these commands are executed by the script as root. So the defaults delete command changes the ownership of the com.apple.finder.plist file, resulting in the loss of your Finder's preferences at reboot. For the same reason, the commands specify the full path to files, because the script isn't running as your user.
The rc.shutdown.local file does not need to be set as executable. It works like it is, but please remember to reboot twice after any change in order to see the effects.
[robg adds: I haven't tested this one. To confirm your user's group membership, you can use groups (which has technically been replaced by the less-obvious id -Gn, but still works in 10.6).]
