|
|
10.6: Clear Finder's Recent Folders list at shut down
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 com.apple.finder 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/com.apple.finder GoToField ''
10.6: Clear Finder's Recent Folders list at shut down
I just tested and this works... save these lines to a file XYZ
defaults delete /Users/$USER/Library/Preferences/com.apple.finder FXRecentFoldersthen source XYZ (best to put in $USER/bin if that is in one's path) |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.06 seconds |
|