How to set keyboard combination to kill the X server?
Solution 1
Gnome:
Open the keyboard preferences (Search for keyboard in Dash), go to the Layout tab and press Options. Open Key sequece to kill the X server and toggle Control + Alt + Backspace
KDE:
I don't run KDE so I can't verify it or make a pretty screenshot, but according to the Ubuntu Wiki, you do as follows:
- Open System Settings
KDE 4.1 - KDE 4.5
Select "Regional & Language"
Select "Keyboard Layout".
Click on "Enable keyboard layouts" (in the Layout tab).
Select the "Advanced" tab. Then select "Key sequence to kill the X server" and enable "Control + Alt + Backspace".
KDE 4.6+
- Select Input Devices under the heading Hardware
Select Advanced Tab
Click on Configure Keyboard Options
- Enable "Key sequence to kill the X server" and enable "Control + Alt + Backspace".
Solution 2
If you are looking for a solution which is independent of Gnome/KDE/Fluxbox or any Desktop Environment or Window Manager, try the following. This command is part of the X Window System.
From https://wiki.ubuntu.com/X/Config/DontZap#Using_the_command_line
Using the command line
You can type the following command to enable Zapping immediately.
setxkbmap -option terminate:ctrl_alt_bksp
If you're happy with the new behaviour you can add that command to your
~/.xinitrc
in order to make the change permanent.
I have provided more information in my answer to 10.10 How can I enable Ctrl+Alt+Backspace?
Related videos on Youtube
BЈовић
Updated on September 18, 2022Comments
-
BЈовић over 1 year
It used to be
ctrl+alt+backspace
to kill x server, but for some unknown reason, it was decided to disable that combination and use something else (I think it isright alt + printscreen +k
).So, how to enable
ctrl+alt+backspace
?I have seen it can be done with installing dontzap, but I know there is a way to set that combination from system setup.
-
BЈовић about 13 yearsWhere are the keyboard preferences? Do I need to install a package?
-
BЈовић about 13 yearsIs that for gnome or KDE? I am using KDE, and I can not find
keyboard preferences
anywhere -
jmardones about 13 yearsYou will find this in 'applications' its called "keyboard"
-
BЈовић about 13 yearsI don't see
applications
anywhere. Are you using KDE or gnome? -
Egil about 13 yearsSorry, I missed it. I found a KDE solution, but I haven't verified it.
-
BЈовић about 13 yearsdoh it was so simple. And I opened that page, but missed
kill x server
page. thanks -
jmardones about 13 yearsPerhaps you can't do this as this is a gnome setting I think
-
BЈовић about 13 yearsThere is a way, but it was changed. See Egil's answer, as it is correct
-
nutty about natty about 11 yearsI tried to disable it but it seems to take no effect: that combo still kills "everything" :( any ideas what might be happening?
-
RobertG over 2 yearsFor Ubuntu 21.10, I now find that this is available as part of the Gnome Tweaks application wiki.gnome.org/Apps/Tweaks