How to get KDE restarted after it crashes

Sometimes, quite annoyingly, the KDE panel ("kicker" I believe it's called) locks up although the various applications seem to keep working. I usually logout by right-clicking on the desktop and choosing Logout from the menu, figuring that restarting KDE will fix the problem. But when I try to login again with KDE as the selected environment, it fails while setting up the 'inter-process communication' with an error questioning whether the dcopserver is running.

To fix the problem, remove the .DCOPserver_gromit file from the $HOME directory, kill all kicker-related processes, and then try to run KDE.