I ferociously make use of Spaces and Exposé. To utilize them I use QuickSilver, Cmd+Tab, the Dock, special Mouse Buttons, but most of all I use the Hot Corners! Occasionally, when I wake my Mac Book Pro these features won’t work. No reason given, just when I try I get the usual chime meaning “this can’t be done.” At the time the only sure solution was to reboot the computer. Not anymore. Just open up your terminal and run:
Since those major features (Spaces, Exposé, and the Dashboard) are tied to the Dock, this command will restart the Dock and, like magic, those features will work again. Killing the Dock and even Finder with `killall` are special cases. Those two will automatically restart on their own. However, for other programs, it will just quit. For instance if Firefox hangs you could type `killall Firefox` and Firefox would be force quit but would not reopen. Check the man page for more information.