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


8

我想Ctrl+ Alt+ Bksp重启X,所以我创建了一个xorg.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-panelgnome-screensavergnome-keyring-demon),但不是gnome-settings-daemon


什么是显示在dconf-editor,org.gnome.desktop.input-sources.xkb选项?
Danatela 2014年

Answers:


0

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

在此处输入图片说明

如果看不到'terminate:ctrl_alt_bksp',则应在此处添加。


我没有使用GNOME设置守护程序,因此dconf-editor(或gsettings)应该无关紧要。事实上,我发现,在dconf-editorterminate:ctrl_alt_bksp在XKB选项列表,但组合键没有任何作用,setxkbmap -print -verbose 10表明,它是没有启用。
reasgt 2014年

没关系以前的评论。我只是意识到使用授权杀死X是荒谬的。
Danatela'4
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.