XorgCtrlAltBackspace

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search

The Ctrl-Alt-Backspace key combination currently "zaps" (hard-restarts) the X server, and thus loses any unsaved data in applications, etc. This key combination is also largely undocumented, so users (probably ex-Windows users) may press this key combination without expecting data loss. This spec proposes to follow upstream's lead and disable this key combination by default in order to prevent this usability issue from occurring in normal installs.

The key combination of Ctrl-Alt-Backspace, which previously immediately exited X (and thus reset the graphics system back to the login screen), has been changed to disabled by default. It can be re-enabled by setting the DontZap xorg.conf option to False or by using the AltGr-SysReq-K key combination instead. This should help reduce the frequency of unexpected data loss and activity interruption for users unaware of its function that strike it accidentally.

For people coming here because they are missing the nice functionality of being able to kill the X server in case nothing else works anymore in the GUI, it might be interesting to know that x can now be killed with "AltGr" - "SysReq" - K (AltGr is the right Alt key. SysReq also labeled "Print Screen."

On Ubuntu, you can edit you xorg.conf (/etc/X11/xorg.conf) and add the DonZap "False" value. That will make Ctrl + Alt + Backspace work again.

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

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

Here is an equivalent command to run from console:

sudo pkill X

Xorg 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 new releases, 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.

Simple Stupid dontzap Tool

Someone made this to make it easy I suppose.

sudo apt-get install dontzap

Open Terminal and type to enable

sudo dontzap --enable

And to disable

sudo dontzap --disable


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