xorg.conf XkbOption 忽略终止:ctrl_alt_bksp 重新启动 X

xorg.conf XkbOption 忽略终止:ctrl_alt_bksp 重新启动 X

我想要++Ctrl重新启动X,所以我创建了一个规则:AltBkspxorg.conf

/usr/share/X11/xorg.conf.d/53-zap.conf:

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

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

并检查/var/log/Xorg.0.log

[  1023.598] (II) XINPUT: Adding extended input device "Asus WMI hotkeys" (type: KEYBOARD, id 11)
[  1023.598] (**) Option "xkb_rules" "evdev"
[  1023.598] (**) Option "xkb_model" "pc105"
[  1023.598] (**) Option "xkb_layout" "us"
[  1023.598] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[  1023.598] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event3)
[  1023.598] (**) AT Translated Set 2 keyboard: Applying InputClass "evdev keyboard catchall"
[  1023.598] (**) AT Translated Set 2 keyboard: Applying InputClass "Keyboard Defaults"
[  1023.598] (II) Using input driver 'evdev' for 'AT Translated Set 2 keyboard'
[  1023.598] (**) AT Translated Set 2 keyboard: always reports core events
[  1023.598] (**) evdev: AT Translated Set 2 keyboard: Device: "/dev/input/event3"
[  1023.598] (--) evdev: AT Translated Set 2 keyboard: Vendor 0x1 Product 0x1
[  1023.598] (--) evdev: AT Translated Set 2 keyboard: Found keys
[  1023.598] (II) evdev: AT Translated Set 2 keyboard: Configuring as keyboard
[  1023.598] (**) Option "config_info" "udev:/sys/devices/platform/i8042/serio0/input/input3/event3"
[  1023.598] (II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD, id
 12)
[  1023.598] (**) Option "xkb_rules" "evdev"
[  1023.598] (**) Option "xkb_model" "pc105"
[  1023.598] (**) Option "xkb_layout" "us"
[  1023.598] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"

最后一行表明它看到了该指令。

然而,当我打开终端并输入setxkbmap -print -verbose 10

Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     us
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+us+inet(evdev)
geometry:   pc(pc105)
xkb_keymap {
    xkb_keycodes  { include "evdev+aliases(qwerty)" };
    xkb_types     { include "complete"  };
    xkb_compat    { include "complete"  };
    xkb_symbols   { include "pc+us+inet(evdev)" };
    xkb_geometry  { include "pc(pc105)" };
};

强制选择,setxkbmap -option terminate:ctrl_alt_bksp给我:

...
model:      pc105
layout:     us
options:    terminate:ctrl_alt_bksp
Trying to build keymap using the following components:
...

我对其进行了测试,它可以X正确重新启动。

我不明白。我上周已经完成了这项工作,但现在它无法XkbOptionxorg.conf文件中加载。是否有另一个图层设置了XKB我不知道的设置?

我正在使用 Ubuntu 13.10,但使用xmonad.我加载了一些 gnome 实用程序 ( gnome-panelgnome-screensavergnome-keyring-demon),但没有加载gnome-settings-daemon

答案1

启动dconf-editor并转到org.gnome.desktop.input-sources.xkb-options.应该是这样的:

在此输入图像描述

如果您没有看到,'terminate:ctrl_alt_bksp'则应该将其添加到此处。

答案2

# inxi -Sy
System:
  Host: fi965 Kernel: 5.4.0-26-generic x86_64 bits: 64
  Desktop: Trinity R14.0.9 Distro: Ubuntu 20.04 LTS (Focal Fossa)
# ls -l /etc/X11/xorg.conf.d/00-keyboard.conf
-rw-r--r-- 1 root root 286 May  6  2014 /etc/X11/xorg.conf.d/00-keyboard.conf
# cat /etc/X11/xorg.conf.d/00-keyboard.conf
# Read and parsed by systemd-localed. It's probably wise not to edit this file
# manually too freely.
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us"
        Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection
#

另一个文件包含Option "DontZap" "off"和。Option "ZapWarning" "off"Section "ServerFlags"

此安装是从 18.04 进行的 apt 升级,这是从 16.04 进行的 apt 升级,而 16.04 是从 14.04 进行的升级,时间戳表明该文件的创建目的。它按预期工作,大概至少可以回到 14.04。我从不使用 Gnome,所以不能说它是否会对行为产生与 TDE 不同的影响。

相关内容