2010-03-12

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


不知從什麼時候開始,我的 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!解決了。



不記下來肯定等一下就忘記。 :D

沒有留言:

張貼留言