xface禁用control+alt+backspace快捷键

博客主页:http://blog.csdn.net/minna_d


idea快捷键太多, 今天写代码i的时候一不小心按下control+alt+backspace,导致X server重启。

在没做好心里准备的情况下重启的代价往往很大,所以我决定禁用重启X server快捷键.google之发现都是ubantu。。。。


下面主要说说我是怎么找到禁用这个快捷键方式过程吧


1.首先想到的命令是xface+TAB自动提示(因为我 xfce4-keyboard-settings 定义过快捷键)

[root@jjy ~]# xfce4-
xfce4-about                   xfce4-clipman-settings        xfce4-mixer                   xfce4-popup-clipman           xfce4-power-manager-settings  xfce4-settings-editor
xfce4-accessibility-settings  xfce4-display-settings        xfce4-mouse-settings          xfce4-popup-directorymenu     xfce4-screenshooter           xfce4-settings-manager
xfce4-appearance-settings     xfce4-keyboard-settings       xfce4-notifyd-config          xfce4-popup-windowmenu        xfce4-session                 xfce4-taskmanager
xfce4-appfinder               xfce4-kiosk-query             xfce4-panel                   xfce4-power-information       xfce4-session-logout          xfce4-terminal
xfce4-clipman                 xfce4-mime-settings           xfce4-popup-applicationsmenu  xfce4-power-manager           xfce4-session-settings        xfce4-volumed
然后发现 xfce4-keyboard-settings并不支持禁用一些系统快捷键

2.查看xfce的配置文件,如下所以直接进入xfce-perchannel-xml目录

[root@jjy ~]# tree /root/.config/xfce4/
/root/.config/xfce4/
├── desktop
│   └── icons.screen0-1904x1033.rc
├── help.rc
├── helpers.rc
├── panel
├── terminal
│   └── terminalrc
├── xfconf
│   └── xfce-perchannel-xml
│       ├── displays.xml
│       ├── keyboard-layout.xml
│       ├── keyboards.xml
│       ├── thunar.xml
│       ├── xfce4-appfinder.xml
│       ├── xfce4-desktop.xml
│       ├── xfce4-keyboard-shortcuts.xml
│       ├── xfce4-mixer.xml
│       ├── xfce4-panel.xml
│       ├── xfce4-session.xml
│       ├── xfwm4.xml
│       └── xsettings.xml
└── xfwm4



3.按关键字搜索xfce-perchannel-xml目录(因为我需要找的是control+alt+back)

如下图





很明显快捷键定义就在/xfce4-keyboard-shortcuts.xml文件中,但我仔细找了找, 里面还是没有发现


4. 我只好换了种思路,首先找到,  xorg.conf,输出所有的文本文件,刷选出带有alt的字符串

[root@jjy ~]# locate xorg.conf | xargs file | grep "ASCII text" | awk -F":" '{print $1}' | xargs cat | grep "alt"
    #Option "XkbOptions" "terminate:ctrl_alt_bksp"
#    Option "XkbOptions" "compose:rwin,terminate:ctrl_alt_bksp"
# Waltop tablets
    Identifier "Waltop class"
# (although not every card will support every resolution).


很明显配置就在ctrl_alt_bksp这一行.所以只需要找到这份文件就可以了(/usr/share/X11/xorg.conf.d/90-keyboard-layout.conf).

[root@jjy ~]# locate xorg.conf | xargs file | grep "ASCII text" | awk -F":" '{print $1}'
/usr/share/X11/xorg.conf.d/50-vmmouse.conf
/usr/share/X11/xorg.conf.d/10-evdev.conf
/usr/share/X11/xorg.conf.d/50-synaptics.conf
/usr/share/X11/xorg.conf.d/90-keyboard-layout.conf
/usr/share/X11/xorg.conf.d/50-wacom.conf
/etc/X11/xorg.conf
/etc/X11/xorg.conf-vesa

5.编辑/usr/share/X11/xorg.conf.d/90-keyboard-layout.conf文件,注释掉ctrl_alt_bksp,重启即可

[root@jjy ~]# cat -n /usr/share/X11/xorg.conf.d/90-keyboard-layout.conf
     1	Section "InputClass"
     2		Identifier "keyboard-all"
     3		MatchIsKeyboard "on"
     4		MatchDevicePath "/dev/input/event*"
     5		Driver "evdev"
     6		Option "XkbLayout" "us"
     7		#Option "XkbVariant" ""
     8		#Option "XkbOptions" "terminate:ctrl_alt_bksp"
     9	EndSection










  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值