Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

When X and GNOME are working normally, I can just hit Ctrl-Alt-F2 to leave GNOME and use the terminal on the second virtual console. To switch back to GNOME, I can just hit Alt-F1.

Today, X or GNOME stopped working normally for me and I was unable to get to a virtual console. I was still able to move my mouse cursor around but I wasn't able to click anything. As far as I could tell, my keyboard was unresponsive, but maybe the right keyboard shortcut would have helped. I ended up pressing the power button on the computer to gracefully shut it down, but what could I have done to avoid this?

I'm using CentOS 6.0 and GNOME 2.28.

share|improve this question
up vote 3 down vote accepted

Connecting over the network (e.g. with SSH) is by far the method that has the best chance of working and the least chance of causing damage that might otherwise be avoidable (such as killing your X session).

If the mouse is working but not the keyboard, it means that X is not completely hosed. Try plugging the keyboard out and back in: this can help if the problem is in the keyboard driver. (It rarely is.) If you have a root terminal or can get one without the help of the keyboard, try typing chvt 2 there (where “typing” means copy-pasting the letters).

Another thing you can try is the magic SysRq key: press Alt+SysRq+R to switch the keyboard away from raw mode, and try Ctrl+Alt+F1 again: this time the key combination should be handled by the kernel and not by X.

share|improve this answer

Usually I try:

  1. to connect using ssh via another host (e.g. I installed putty on my mobile phone).
  2. to press CrtlAlt-Backspace to kill the X session.
share|improve this answer
ssh'ing in from another host is a great idea; I used to do this from a computer lab I used to work next to, though this isn't available to me any more. I'm pretty sure I tried Ctrl-Alt-Backspace to no avail, unfortunately. – Philip Durbin Oct 12 '11 at 17:12

try Alt-SysRq-k to kill the X process, then Alt-SysRq-r to reset the keyboard, then Alt-F2 (not ctrl, since you're back in the kernel keyboard handler not X) to move to other virtual console.

These keys are assigned to their physical locations on a QWERTY keyboard. If you have Dvorak you will need to use different keys.

share|improve this answer
No need to start with Alt+SysRq+K: sometimes Alt+SysRq+R then Alt+F2 will be enough. – Gilles Oct 12 '11 at 23:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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