My GNU/Linux box just hanged. It is actually my own fault as I tried to empty the swap partition (with sudo swapoff -a; sudo swapon -a) without realizing that I don't have enough RAM space! Anyway, if you have a hung X session, what can you do?
Note: I assume that you are using QWERTY keyboard. If not, convert the key sequence as described here [wikipedia.org].
Ctrl-Alt-Backspace. This should bring you back to the X login window. You can't do this in Ubuntu anymore. If so, kill the processes in the current virtual console as described below.Alt-SysRq-K if you fail to kill the X session as described above. This should bring you back to the X login window.You can memorize this magic sequence with "Reboot Even If System Utterly Broken", or simply "BUSIER" backwards.