You are not logged in.

#1 2022-09-22 19:35:03

wpyoga
Member
Registered: 2022-08-07
Posts: 4

How to disable Ctrl-Alt-Backspace ?

I'm looking for the proper way to disable Ctrl-Alt-Backspace.

According to the wiki, this key combination is disabled by default.

However, I used archinstall and installed the system along with XFCE, and there's this file /etc/X11/xorg.conf.d/00-keyboard.conf:

# Written by systemd-localed(8), read by systemd-localed and Xorg. It's
# probably wise not to edit this file manually. Use localectl(1) to
# instruct systemd-localed to update it.
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us"
        Option "XkbModel" "pc105+inet"
        Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

I looked up the man pages for systemd-localed and localectl, but I still couldn't figure out how to disable the key combination.

The manpage for localectl mentions kbd(4), but I couldn't find it. "pacman -F kbd.4.gz" returned nothing.

I searched for the keyword terminate:ctrl_alt_bksp in /usr, and found these files, but it got me nowhere:

$ sudo grep -r terminate:ctrl_alt_bksp -l /usr
/usr/share/X11/xkb/rules/base.xml
/usr/share/X11/xkb/rules/base
/usr/share/X11/xkb/rules/base.lst
/usr/share/X11/xkb/rules/evdev.lst
/usr/share/X11/xkb/rules/evdev.xml
/usr/share/X11/xkb/rules/evdev
/usr/share/systemd/kbd-model-map

Can someone please explain, what I should do to disable the key combination?

And is the wiki wrong?

Thanks!

Offline

#2 2022-09-22 20:50:36

seth
Member
Registered: 2012-09-03
Posts: 52,096

Re: How to disable Ctrl-Alt-Backspace ?

Option "XkbOptions" "terminate:ctrl_alt_bksp"

Remove that and add /etc/X11/xorg.conf.d/10-server.conf

"Section "ServerFlags"
    Option         "DontZap" "true"
EndSection

https://man.archlinux.org/man/extra/xor … .conf.5.en
(Removing the xkb option isn't strictly required if you have DontZap, but it's also stupid to have it there despite)

Edit:

And is the wiki wrong?

No, the xkb shortcut isn't enabled by default.
archinstall is simply steamrolling someones opinion about the system config onto your system - if you don't like that, don't use it.

Last edited by seth (2022-09-22 20:52:22)

Offline

#3 2022-10-29 05:36:56

wpyoga
Member
Registered: 2022-08-07
Posts: 4

Re: How to disable Ctrl-Alt-Backspace ?

Hi, apologies for replying so late. I didn't check my notifications.

I have added the file /etc/X11/xorg.conf.d/99-dontzap.conf with the following content:

Section "ServerFlags"
    Option "DontZap" "true"
EndSection

And it worked, Ctrl-Alt-Backspace doesn't do anything anymore.

I think I found where archinstall created that entry... it's in set_keyboard_language() where it calls localectl set-keymap "" and then localectl set-keymap us, which generates the file /etc/X11/xorg.conf.d/00-keyboard.conf.

I can then remove the Ctrl-Alt-Backspace shortcut by calling localectl set-x11-keymap us pc105+inet. However, it's actually more like constructing the 00-keyboard.conf file from scratch, rather than removing that option.

Short of editing /usr/share/systemd/kbd-model-map, is there a way to prevent localectl set-keymap us from generating the Ctrl-Alt-Backspace shortcut?

Offline

#4 2022-10-29 06:44:29

seth
Member
Registered: 2012-09-03
Posts: 52,096

Re: How to disable Ctrl-Alt-Backspace ?

Probably not. Using higher level tools implies that you're subscribing to somebody elses opinion.
nb. that you can add/remove that xkb option anytime during runtime -  the only way to protect a running server against zapping is the server flag. And then the presence of the xkb option becomes irrelevant.

Offline

Board footer

Powered by FluxBB