Disable Ctrl+Alt+Backspace from Restarting X Windows on Linux

If you’ve used Linux for any amount of time, you’re already familiar with the Ctrl+Alt+Backspace shortcut key combination that restarts X Windows immediately… but have you ever wondered if there is a way to disable that behavior?

Turns out it’s extremely simple to do, although I’m not necessarily recommending that you do this… it’s more for informational purposes. (while Linux might be rock-solid, I’ve had more than my share of crashing in Gnome, so the shortcut key is useful)

Disable Ctrl+Alt+Backspace

The first thing you’d probably want to do is make a backup of the xorg.conf file, which you can do with this command:

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.orig

Then you can edit the xorg.conf file by using Alt+F2 to open up the Run dialog and using the following command:

gksu gedit /etc/X11/xorg.conf

image

Now go to the bottom of the file and look for a section called “ServerFlags”, which might not exist. If the section does not exist, add this to the bottom of the file:

Section "ServerFlags"
Option "DontZap"  "yes"
EndSection

If that section does exist, then just add in the option line:

Option "DontZap"  "yes"

You’ll have to restart X again, the easiest way is ironically by using Ctrl+Alt+Backspace… but at that point the shortcut key won’t be active anymore.

If you somehow managed to totally screw up your system by making this change, you can copy the xorg.conf.orig file back to xorg.conf to switch back to the original configuration.

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.