Finder stopped opening a new window when I click the Dock icon
When I click on the Finder icon in the dock, it always used to open a new window for me unless I already had a window open. In that case it would bring that window to the front which was no problem. But now if I have no windows open, and I click on the Finder icon, no new window opens. I have to hit Command-N if I want a new window.
Which setting do I have to change, so that Finder will open a new window if there is not already a window open?
What about when creating a new user? Does that work over there or has it the same behavior?
If it DOES work on the new user, I would try this is in order inside the problem account:
It is (hopefully) unnecessary to mention that you want to create a backup of your machine first before trying the following steps, but I still felt the urge to do so.
- flush all cache files (
~/Library/Caches/*.*
)- in Finder, open menu "Go", press down "Alt" and while holding click on "Library"
- navigate INTO the Caches folder and select every object you can find and remove them
- reboot the computer (logging in and out possibly does the same trick, but I want to be sure)
- empty the Trash at your leisure once logged back in
- check ~/Library/Saved Application States to see if there is a folder com.apple.Finder and dump it (if there is not, less work for you)
- This is more of a blunt measure, but I think still worth trying: create a folder on the Desktop, move all preference files in there and then test AFTER you logged out and back in. If it resumed working, try again with more and more preferences put back until either all are back in or the problem re-occurs. Occasionally, you may want to log out and back in as well to see if, after placing a file back, the behavior starts again. If removing all preferences does not bring the behavior back to normal, just move all back in overwriting every newly created one.
Until their respective preference files are back in, I would recommend not to open those applications (especially Mail) as this may have side-effects on your applications' settings and sometimes content becoming inaccessible (or more difficult to reach/get back).
The reasoning behind number 3 is that some preferences may not be viewed as the obvious origin, but still may have caused that. Removing them all and then putting them back one-by-one (or 5 at a time) makes sure that you can identify which file this has actually caused.
In the event that a newly created user has the same behavior (only then), you can try to install the latest combo update or re-install Mac OS X (no erase, just installing over the existing installation) to repair/re-add corrupted/missing files.
This could well be down to bad prefs, for either Finder or the Dock.
Try running the following in Terminal and then testing the Finder icon again:
mv ~/Library/Preferences/com.apple.finder.plist ~/Library/Preferences/com.apple.finder.plist.BAK
killall Finder
mv ~/Library/Preferences/com.apple.dock.plist ~/Library/Preferences/com.apple.dock.plist.BAK
killall Dock
If that doesn't work, you can restore your old prefs with the following:
mv ~/Library/Preferences/com.apple.finder.plist.BAK ~/Library/Preferences/com.apple.finder.plist
killall Finder
mv ~/Library/Preferences/com.apple.dock.plist.BAK ~/Library/Preferences/com.apple.dock.plist
killall Dock
I ran the first line of code you shared mv ~/Library/Preferences/com.apple.finder.plist ~/Library/Preferences/com.apple.finder.plist.BAK killall Finder and I managed to get my Finder window to work again.