2014年7月1日 星期二

fcitx無法啟動

OS: Arch linux
桌面: Xfce

狀況:
重開機後fcitx工具列上的小圖示和選字面板不見,但是可以打中文

在console打fcitx出現錯誤:
...
(WARN-xxx /build/fcitx/src/fcitx-4.2.8.3/src/module/dbus/dbusstuff.c:246) DBus Service Already Exists
(ERROR-xxx /build/fcitx/src/fcitx-4.2.8.3/src/lib/fcitx/instance.c:427) Exiting.
(因為fcitx已經在執行了)

解法:
重裝fcitx-im
# pacman -Rc fcitx
# pacman -S fcitx-im
# pacman -S fcitx-configtool # 這和下面那個要裝其中一個"fcitx設定"才會有GUI功能出來
# pacman -S kcm-fcitx
# pacman -S fcitx-chewing # 新酷音
# pacman -S fcitx-googlepinyin # google拼音
$ rm -r ~/.config/fcitx # 移除設定檔,不移除重裝面板還是出不來

登入時出現錯誤訊息:
Failed to execute login command
解法:
$ cp /etc/skel/.xinitrc ~
這樣之後xfce桌面會變成英文。我的.xinitrc設定檔內容是:
LANG=zh_TW.UTF-8
LC_CTYPE=zh_TW.UTF-8
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
exec startxfce4

簡繁體切換時提示被關掉後,要叫出來:目前無解
要還原設定就備份fcitx/config檔
目前確定不是addon、conf資料夾和profile、cached_layout、config檔案在搞鬼

fcitx英文單字自動提示
http://chakra-zh.blogspot.jp/2013/02/fcitx.html
開啟fcitx後換到英打(鍵盤-英語 (美式))輸入法,用快捷鍵開啟拼字提示功能,預設為「Ctrl+Alt+H」。
使用「Alt+數字」就可以選擇單字輸入。
設定單字提示為10個(預設5個):
fcitx圖示上點右鍵-> 設定-> 輸入法分頁點"鍵盤-英語 (美式)" -> 點下面設定的圖示 -> 勾選"顯示進階選項" -> 設定"拼寫提示候選字最大個數"為10 -> 確定

fcitx貼上歷史的剪貼簿
ctrl+;

注音和拼音輸入然只能打英文
這是在pacman -Sy後出現的情況,更新最新的fcitx後即可解決
# pacman -S fcitx