Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the '10.6: Clear Finder's Recent Folders list at shut down' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Clear Finder's Recent Folders list at shut down
Authored by: ruggix on Feb 09, '10 12:57:39PM
Hi Zim, I try to answer your questions: a) if you simply run the script it does not work because it needs a Finder restart to update, since Finder keeps its preferences in the cache . So to see the effect of the "defaults delete" command you should launch the following command: sudo killall FInder This is the reason why I wanted the script to run at shutdown and not at login, just to avoid the killall command. b)I think you cannot rewrite it like this. As a matter of fact the script is executed by "root" and not by your_user so the variables $USER and $GROUP would not be yours but the one of root's environment. Rather than this, I would try to follow the logouthook suggestion but I haven't tried it yet: in this way the script is executed by your user at logout, so the defaults command does not need the full path but just and the chown command is not needed at all. Just one more hint. If you want to clear the content of the "Go to folder" messagebox (cmd+G) add the following before the chown: defaults write /Users/Your_User/Library/Preferences/ GoToField ''

[ Reply to This | # ]
10.6: Clear Finder's Recent Folders list at shut down
Authored by: Zim on Feb 09, '10 02:30:23PM
I just tested and this works... save these lines to a file XYZ

defaults delete /Users/$USER/Library/Preferences/ FXRecentFolders
chown ${USER}:${GROUP} /Users/$USER/Library/Preferences/
sudo killall Finder


source XYZ

(best to put in $USER/bin if that is in one's path)

[ Reply to This | # ]