I've just read How to enable killing X.org with ctrl+alt+backspace and am really happy, that control-alt-backspace no longer kills my X-Server. However, I'd like to have a way to kill it. It just should be something more complicated than what I type by accident ten times a day.

Is there a way to define an custom binding for the kill-command?

I'd like to use control-alt-meta-shift-backspace or alike and from the line

 Option          "XkbOptions" "terminate:ctrl_alt_bksp"

it's not obvious how to do it (unless it is "terminate:ctrl_alt_meta_shift_bksp" which doesn't seem to work).

  • may I know why would you want to do that? – Edward Torvalds Feb 13 '16 at 18:05
  • @edwardtorvalds From time to time, some application eats the focus and hangs forever. Killing the X server sounds cleaner than pressing the power button. In no case it must happen with C-A-Backspace. – maaartinus Feb 13 '16 at 18:27

XkbOptions refers to a rule defined in the XKB rules file, normally /usr/share/X11/xkb/rules/base, which will look like:

terminate:ctrl_alt_bksp =   +terminate(ctrl_alt_bksp)

That in turn picks up the definition from the terminate symbols file, normally /usr/share/X11/xkb/symbols/terminate. I'm not sure if you can just add more modifiers to the type="CTRL+ALT" line there or if there's limits on the type value.

Documentation on XKB customization can be found at http://www.x.org/wiki/XKB and may be able to help fill in some of the gaps in this answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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