在arch linux中安装好fcitx和fcitx-google拼音输入法后, 在桌面上显示了fcitx图标,但是没有显示装好的拼音输入法,点击 配置当前输入法, 会打开一个文本文件, 大概一看, 也不知道怎么修改。我已经在/etc/profile设置了。
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
保证在桌面启动前找到这些变量, 我参考了在另一台可以正常使用fcitx-googlepingyin输入法的arch linux机器, 设置的变量都一样,可就是不能使用fcitx google拼音输入法。
没办法, 我只好卸载了fcitx, 用ibus框架, 和ibus 拼音输入法。可是ibus感觉界面太丑, 用chromium时, 有时候不能输入汉字。想来想去还是改回fcitx.
去arch linux的 wiki关于fcitx有这么一段话:
Buildin Chinese Pinyin Default NOT ACTIVE
If your locale is en_US.UTF-8, fcitx did NOT enable the buildin Chinese Pinyin input method by default. There is only fcitx-keyboard-us input method enabled. You can get a notice by fcitx-diagnosecommand like this:
## Input Methods:
1. Found 1 enabled input methods:
fcitx-keyboard-us
2. Default input methods:
**You only have one input method enabled, please add a keyboard input method as the first one and your main input method as the second one.**
Then you should add Pinyin or Shuangpin input method to actived input methods by the GUI configure tool.
我想起了我在locale-gen文件中开启了 en_US.UTF-8, 这个是在最上面, 可能就是这个问题。安装了fcitx-configtool,在fcitx中点击 配置当前输入法, 这时会出现一个图形工具,在输入法选项卡最下一行 点击加号后, 选择拼音后, 重启fcitx,发现刚安好的fcitx拼音输入法显示啦。