For ending processes I usually open a terminal and type
at the prompt. That gives me a list of running processes. I find the number of the one I want to kill and type
(substituting the actual number for "processnumber"). Then I run ps -e again to see if the process is gone and run the kill command again until whatever I wanted to get rid of is gone.
I think there's a way to kill a process and all its children, but I don't know how to do it. The ps -e routine works well enough for my needs.
If you run ps -e as user, you can kill only the processes that belong to you. If you run ps -e as root, you can kill anything.
This also works if things are so messed up that you have to open a new console with Alt-F2 or some other combination. After you log in, you can run ps -e and kill the problem processes, then do Alt-F7 to get back to your window manager.