Switch to a tty, and do some geeky debugging.
Pressing Ctrl+Alt+F1 through F6 switches to
tty6 respectively. A
tty is a virtual terminal. log in to your account, and in case of a crash, submit a bug report. (Answer by Me)
To restart Graphical User Interface -
sudo service lightdm restart
This will log you out in GUI and gets you back to login screen. If you use a non-default display manager, replace
gdm as appropriate.
In most cases, restarting unity should work.
This will restart just Unity. Any open applications will remain open, and is hence safe and better to try this before restarting DM. If the command exits with
137; retry it. It works. If the command exits with
1, Retrying it will have no effect. It will continue to fail.
Remember to switch to graphical console on tty7 after running this. (Ctrl+Alt+F7 )
The magic SysRsq combinations are guaranteed to work. there are a whole lot of them, and googling may help.
For now, we are particularly interested in Alt+PrintScr+K, which kills all processes on a tty, so while on
tty7 ( the default one with graphics) it kills Xserver and brings you back to login screen.