码迷,mamicode.com
首页 > 其他好文 > 详细

xface禁用control+alt+backspace快捷键

时间:2015-01-27 15:08:00      阅读:322      评论:0      收藏:0      [点我收藏+]

标签:

博客主页: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










xface禁用control+alt+backspace快捷键

标签:

原文地址:http://blog.csdn.net/minna_d/article/details/43193467

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!