# Ctrl + Alt + Backspace to kill xserver



## litk (Sep 1, 2016)

Hi,
I'm trying to configure to kill xserver but nothing works. I tried via /etc/X11/xorg.conf and /usr/local/etc/X11/xorg.conf with this:


```
Section "InputDevice"
  (...)
  Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection
```
and via .xinitrc with:

```
setxkbmap -option terminate:ctrl_alt_bks
```
Is it possible?


----------



## Juha Nurmela (Sep 1, 2016)

Works here.  Do you have Option "DontZap" false ?

Juha


```
$ cat /usr/local/etc/X11/xorg.conf.d/keyboard.conf
Section "InputClass"
  Identifier  "KeyboardDefaults"
  Driver  "keyboard"
  MatchIsKeyboard "on"
  Option  "XkbLayout" "fi"
  Option  "XKbOptions" "terminate:ctrl_alt_bksp"
EndSection
 $ setxkbmap -print
xkb_keymap {
  xkb_keycodes  { include "xfree86+aliases(qwerty)"  };
  xkb_types  { include "complete"  };
  xkb_compat  { include "complete"  };
  xkb_symbols  { include "pc+fi+inet(pc105)+terminate(ctrl_alt_bksp)"  };
  xkb_geometry  { include "pc(pc105)"  };
};
 $ xmodmap -pm
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift  Shift_L (0x32),  Shift_R (0x3e)
lock  Caps_Lock (0x42)
control  Control_L (0x25),  Control_R (0x6d)
mod1  Alt_L (0x40),  Meta_L (0x9c)
mod2  Num_Lock (0x4d)
mod3   
mod4  Escape (0x73),  Super_R (0x74),  Super_L (0x7f),  Hyper_L (0x80)
mod5  Mode_switch (0x8),  ISO_Level3_Shift (0x7c)
```
Running xev and pressing each of the keys separately shows Control_L, Alt_L and BackSpace. Control-Alt-Space shows space with modifier state 0xc


----------



## tobik@ (Sep 1, 2016)

litk said:


> setxkbmap -option terminate:ctrl_alt_bks


I have this in my ~/.xinitrc and it works fine: `setxkbmap -option terminate:ctrl_alt_[b]bksp[/b]`.
Is it maybe just a typo? setxkbmap will unfortunately not print an error message if you get it wrong.

There should be no need to create an xorg.conf file for this.


----------



## litk (Sep 1, 2016)

> Is it maybe just a typo?


You have right, there was a typo but it doesn't work anyway for me. But this works:

```
$ cat /usr/local/etc/X11/xorg.conf.d/keyboard.conf
```
I think because X suspends but this is another problem for another topic.*https://forums.freebsd.org/members/46436/*


----------

