cht電腦資訊Linux
adm Find login register

解決按 Ctrl + Alt + Backspace 無法離開 X Window 的問題

coolcd
joined: 2008-01-21
posted: 2596
promoted: 348
bookmarked: 95
1subject: 解決按 Ctrl + Alt + Backspace 無法離開 X Window 的問題Promote 3 Bookmark 22010-03-11quote  

不知從什麼時候開始,我的 debian testing 就已經無法用傳統的 Ctrl+Alt+Backspace 離開 X Window 了,今天 google 了一下,發現似乎 Ubuntu 9.10 也是如此,據說是有人覺得會誤按,所以把它改成預設不啟用了。

Howto Enable Ctrl + Alt + BackSpace in Ubuntu Jaunty 這篇文章說只要在 /etc/X11/xorg.conf 加入 DontZap 的設定就可以重新啟用這組快捷鍵

 Section "ServerFlags"
    # DontZap on for disabling Ctrl+Alt+Backspace killing X
    # DontZap off for enabling Ctrl+Alt+Backspace killing X
    Option "DontZap" "off"
EndSection

不過我在 Debian 上測試無效。

又 google 到 How to enable/disable Ctrl+Alt+Backspace in Ubuntu 9.10 (Karmic) 可在 hal 的設定中修改:

先找到下面的檔案:

/usr/share/hal/fdi/policy/10osvendor/10-x11-input.fdi (inside the <match key=”info.capabilities” contains=”input.keys”> section):

再修改設定:

<merge key="input.xkb.options" type="string">terminate:ctrl_alt_bksp</merge>

不過 Debian testing (Squeeze) 找不到這個設定

於是只好靠指令

setxkbmap -option terminate:ctrl_alt_bksp

成功了。但是,難道要把它加到 ~/.xinitrc 這麼暴力?再找找看。

後來找到 #bug567808

在 /etc/default/keyboard 中

XKBOPTIONS="terminate:ctrl_alt_bksp" 

YES!解決了。

不記下來肯定等一下就忘記。 大笑

eliu

joined: 2007-08-09
posted: 11468
promoted: 617
bookmarked: 187
新竹, 台灣
2subject: Promote 0 Bookmark 02010-03-12quote  
gcin 用 ctrl-alt 切換的要小心,如果最後一個鍵旁邊是 backspace,就要小心不要按錯。
coolcd
joined: 2008-01-21
posted: 2596
promoted: 348
bookmarked: 95
3subject: Promote 0 Bookmark 02010-03-12quote  

lucky.freebsd.question 也有一些討論,其中 Philipp Lengemann 提到,像下面這樣修改 xorg.conf 在他的電腦運作得很ok:

 Section "ServerFlags"
  Option "DontZap"         "off"
  Option "AllowEmptyInput" "off"
  Option "AutoAddDevices"  "off"
EndSection
Section "InputDevice"
  Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection
不過我懶得再試了。 XD
先記下來,以後有問題再說。

cht電腦資訊Linux
adm Find login register
views:9690