How to enable killing Xorg with Ctrl+Alt+Backspace

I don’t remember why they did this, but at one point X.org decided that disabling CtrlAltBackspace to kill it was a good idea. I know there’s a way to re-enable it but I don’t remember how. Can someone refresh my memory?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Modify /etc/X11/xorg.conf or a .conf file in /etc/X11/xorg.conf.d/ with the following. (note: it is ok if this is all you have in your xorg.conf as xorg will still auto-detect the rest (note: that is if auto-detect works for you without it))

Section "ServerFlags"
    Option "DontZap" "false"
EndSection

Section "InputClass"
    Identifier      "Keyboard Defaults"
    MatchIsKeyboard "yes"
    Option          "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

Method 2

The DontZap feature is no longer working for me on Fedora 16 and Ubuntu 11.10 (most recent releases as of November 2011), so I found an alternative.

According to the X11R7.5 release notes, it appears that this functionality has been migrated to a XKB configuration option, therefore DontZap no longer works. I can’t tell if this is a detail of the Xorg implementation in Fedora and Ubuntu, or if this affects other distros as well.

From http://www.x.org/archive/X11R7.5/doc/RELNOTES.txt

Terminate Server keystroke

The Xorg server has previously allowed users to exit the server by pressing the keys Control + Alt + Backspace. While this function
is still enabled by default in this release, the keymap data
usually used with Xorg, from the xkeyboard-config project, has been
modified to not map that sequence by default, in order to reduce
the chance that inexperienced users will accidentally destroy their
work.

Users who wish to have this functionality available by default may enable it via the XKB configuration option
“terminate:ctrl_alt_bksp”. For instance, the setxkbmap command can
be used to enable this by running:

       setxkbmap -option "terminate:ctrl_alt_bksp"

Many desktop environments include XKB configuration options in
their preferences to enable this as well.

Method 3

In current Ubuntu releases, at least since 14.10, the keyboard-configuration package has an option to re-enable Zap:

$ sudo dpkg-reconfigure keyboard-configuration

Method 4

With debian or based on, you can add this option :

XKBOPTIONS="terminate:ctrl_alt_bksp"

to /etc/default/keyboard file

Method 5

you can try following ( I have tried it on my Ubuntu) :

Add the following lines to your xorg.conf file, making sure that when you paste it, it is NOT using smart quotes.

sudo gksudo gedit /etc/X11/xorg.conf

Section "ServerFlags"
Option "DontZap" "false"
EndSection

you can also try dontzap tool

sudo apt-get install dontzap

Open Terminal and type to enable

sudo dontzap --enable

for disable

sudo dontzap --disable

Method 6

@xenoterracide’s solution is ok if the AutoAddDevice option is enabled in the ServerLayout of your xorg.conf. If not (especially in multiseat X configurations), you need to insert the XkbOptions line into the InputDevice section describing your keyboard. For example:

Section "InputDevice"
  Identifier  "keyboard-vmware"
  Driver      "evdev"
  Option      "Device" "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
  Option      "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

Method 7

In RHEL 7.3, xenoterracide’s answer worked for me, with one tweak: the path to the config file is /etc/X11/xorg.conf.d/00-keyboard.conf.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x