Ctrl+Alt+Backspace to kill X server can’t be disabled

gnomekeyboard shortcutskillxorg

I would like to disable the Ctrl+Alt+Backspace shortcut to kill my X server. I have tried disabling it in the gnome-keyboard-properties "Layout Options…" dialog. When I start the dialog, the option is checked as below:

enter image description here

If I uncheck that box, and push the Close button, and open the "Layout Options…" dialog again, the box is still checked. How can I make unchecking that box persist, and the Ctrl+Alt+Backspace shortcut disabled? I know about the xorg.conf options but I don't always have root access, and would like this user-level setting to work.

I'm using CentOS 6.5, GNOME 2.28.2, and X.Org 1.13.0.

Best Answer

You could try disabling the key mapping. First check

xmodmap -pke | grep -i server

If may say something like

keycode  22 = BackSpace Terminate_Server BackSpace Terminate_Server BackSpace Terminate_Server

If you find something like this, re-map the key with xmodmap, replacing the Terminate_Server with BackSpace (case matters here!):

xmodmap -e "keycode 22 = BackSpace BackSpace BackSpace BackSpace BackSpace BackSpace"

If it works, execute this command every time you log into your machine. There are dozens of ways to automate this, e.g. by adding it to a new shell script that you add to "startup programs" in your window manager's settings - this varies with your window manager.

Related Question