Enable killing X.org with a custom key combination

keyboard shortcutskillsettingsxorg

I've just read How to enable killing X.org with ctrl+alt+backspace and am really happy, that controlaltbackspace 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 controlaltmetashiftbackspace 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).

Best Answer

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.

Related Question