Enabling Ubuntu’s ctrl-alt-bs X server reset

Last updated Dec 18, 2010 — 7734 views

Somewhere along the line, the Ubuntu development team disabled a standardized keyboard shortcut that many long-time Linux users had grown accustomed to. Namely: using the ctrl-alt-backspace key combo for quickly and conveniently restarting the system’s X window system when needed.

As a Linux user for over a decade, I hesitate to admit that my system ever crashes. But let’s be straight about it: like all software, Linux apps can occasionally crash and freeze up the desktop. When this happens, it’s handy to be able to hit ctrl-alt-backspace and restart the desktop without having to resort to pressing the system’s reset button. It’s very rare — but frankly, it does happen once in a while.

Although it’s easy to activate Ubuntu’s optional ctrl-alt-backspace key combo for restarting the X window system, the required configuration setting is somewhat obscure. Additionally, I recently googled the issue and found several blog and forum posts that provide instructions that don’t reflect the current version of Ubuntu. So, the purpose of this short post is to document the procedure as of Ubuntu 10.10.

Enabling Ubuntu’s ctrl-alt-backspace X server reset function

Follow these simple steps:

  • Go to Menu > System > Preferences > Keyboard
  • Select the Layouts tab
  • Click the Options button
  • Click the Triangle to the left of the line that says “Key sequence to kill the X server”
  • Check the box to the left of Ctrl + Alt + Backspace

That’s it. The screenshots below show a few aspects of the process.





Why would you want to use this command? Basically, it’s a way to reset a portion of your system — the X window system — in case it ever freezes up, without resorting to pushing the reset button. Bear in mind, however, that any apps running on top of X will be stopped ungracefully, resulting in possible loss of data.

Naturally, if an application crashes in a manner that disables the keyboard driver, pressing ctrl-alt-backspace won’t do anything. In that case, you might try unplugging the keyboard and plugging it back in again, in hopes that it will get recognized and reactivated by the system. Or, if your system happens to have an ssh server running on it, you could log in remotely and shut the system down gracefully.
 



8 responses to “Enabling Ubuntu’s ctrl-alt-bs X server reset”

  1. Neil says:

    Thanks.

    Occasionally my mouse freezes and I have to shut down.

    Hopefully this will take care of that.

  2. Bill says:

    Thanks,
    I’ve been having trouble with 10.10 when it starts. I’ve been going to an alternate terminal (ctl alt F1), logging in as root and killing the appropriate process. This will make things easier.

  3. Jon says:

    Another way to reset the computer if there is a total OS lock is [Alt]+[PrtScrn]+[R][E][I][S][U][B]. This will work even if the Keyboard has locked up also (At least most of the time).

    Note- the Brackets denote that these are actual keys/buttons and are not to be pressed.

  4. Geoff says:

    Don’t forget about Reisub. Only ever once that I can recall, my desktop became unresponsive and ctrl-alt-backspace hadn’t even worked; but I was able to kill everything and restart gdm that way. (Alt-SysRQ + R, for Raw keyboard, then tErminate to kill everything, then I could restart gdm and be back on my way without a reboot!) 🙂 Be wary that if you progress to the U in Reisub, you will not be able to save anything as the file-system is re-mounted as read-only. So simply Alt-SysRq-E is usually good enough if restarting X doesn’t work.

  5. iguest says:

    You could also try holding down Alt and SysRq (which is the Print Screen key) while slowly typing REISUB – Usually it will get your system restarted.

  6. john says:

    Also works for U10.04.1
    Thanks

  7. jhansonxi says:

    Just use Alt-SysRq(Print Screen)-K
    https://wiki.ubuntu.com/X/Config/DontZap

  8. uboonto says:

    AltGr+PrintScreen/SysReq+k is a good solution, but if you don’t want to lose some important job and you can single out an application that is causing the freeze, you can switch to terminal pressing Ctrl+Alt+F1 (Any F-key amongst: F1, F2, F3, F4, F5, F6) – which will put X in “background”. Then login through the shell, kill the application causing the freeze and get X back up with Ctrl+Alt+F7.