Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

At this moment my Compiz crashed, and the top bar disappeared, as also Alt + Tab, or the left launcher. So I cant open a terminal (with ctrl+t), or change program that I am using. Im locked into firefox and cant open, reboot or logoff (only on the power button). What can I do?

PS: After I upgraded from 11 to 12.04 my ubuntu is always crashing, lagging more, etc.

share|improve this question

closed as off-topic by bain, Luis Alvarado Jul 24 '14 at 22:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Bug reports and problems specific to development version of Ubuntu should be reported on Launchpad so that developers can see, track and fix these issues." – bain, Luis Alvarado
If this question can be reworded to fit the rules in the help center, please edit the question.

Magic combinations to your rescue. Alt+Printscr+K should mercilessly kill everything and get you back to login screen. – Mahesh Jun 15 '12 at 13:48
thanks. you saved me from prision! =] – Ricardo Martins Jun 16 '12 at 1:35

Option 1:

Switch to a tty, and do some geeky debugging.
Pressing Ctrl+Alt+F1 through F6 switches to tty1 through 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 lightdm with kdm or gdm as appropriate.

  • In most cases, restarting unity should work. unity --replace

    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 )

Option 2:

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.

share|improve this answer
what if unity --replace doesn't terminate at all? – lenz Jun 22 '13 at 7:38

The old CTRL-ALT+1 opens a text terminal.

From there you can troubleshout or simply issue a shutdown command.

share|improve this answer

Switch to terminal number 1 (control+alt+F1) and run

DISPLAY=:0 unity --replace


DISPLAY=:0 compiz --replace

Sometimes it doesn't restart; Just kill all compiz processes and try again in case.

share|improve this answer
compiz supports the --display flag. So those prefer can run compiz --display :0 --replace instead of DISPLAY=:0 compiz --replace. – Eliah Kagan Jul 6 '12 at 16:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.