4

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.

3
  • Michael, See the official documentation from Centos. centos.org/docs/5/html/Deployment_Guide-en-US/… Aug 7, 2014 at 18:40
  • Thanks, I do know about the xorg.conf options but would like this setting to work instead. It will affect things at the user instead of system level. I have updated my question to clarify. Aug 7, 2014 at 19:06
  • Michael, I understand. There is probably a bug, but you can ask that on a mailing list. Aug 7, 2014 at 19:12

2 Answers 2

2

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.

-2

There is a workaround to this problem:

  1. Open the "Keyboard preferences" dialog, the "Layouts" tab
  2. Use "Add" button to add another keyboard layout, any layout will do, the first one is Afganistan, it works too
  3. On the "Choose a Layout" dialog use the "Add" button to add selected layout and close the dialog
  4. You are back on the "Keyboard preferences" dialog, use "Layout Options..." to disable "Key sequence to kill the X server" and it works now, your changes are persisted
  5. If you want, you can remove any additional keyboard layouts that you added temporarily

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .