Restart OS X Dock
June 10, 2009 on 10:44 am | In General | 3 CommentsFor the last 6 months or so, I’ve run into the same problem across a range of different mac computers. I go to change an application or open a finder window and it just wont work.
I have a second window changer installed which is called witch. I highly recommend using this if you don’t already since it lets you change to a specific window rather than just an application.
I originally thought the issue was with Finder but after a bit of searching, it turns out to be a problem with the Dock. I looked around for apple scripts which could restart Dock but the only one I could find was a bit hit and miss in its success. So I put together my own very simple script.
Simply create a new apple script and put in this:
do shell script "kill -HUP `ps -aux | grep Dock | grep -v grep | awk '{print $2}'`"
Save it to your desktop and next time your system stops letting you change windows and such like, simply run this script and it will restart your dock.
I used to reboot every time this happened so I’m glad I finally got around to putting a proper solution together.