1, 我安装Ubuntu是纯 英文环境,首先安装Fcitx:
<!--<br/ /><br/ />Code highlighting produced by Actipro CodeHighlighter (freeware)<br/ />http://www.CodeHighlighter.com/<br/ /><br/ />-->sudoapt-getinstallfcitxim-switch
设置过程:
<!--<br/ /><br/ />Code highlighting produced by Actipro CodeHighlighter (freeware)<br/ />http://www.CodeHighlighter.com/<br/ /><br/ />-->sudoim-switch-sfcitx-zall_ALL
2.编 辑 /etc/gtk-2.0/gtk.immodules(如果存在的話) 或者 /usr/lib/gtk-2.0/2.10.0/immodule-files.d/libgtk2.0-0.immodules 文件,在xim 的 local 增加 en ,也就是說将:
<!--<br/ /><br/ />Code highlighting produced by Actipro CodeHighlighter (freeware)<br/ />http://www.CodeHighlighter.com/<br/ /><br/ />-->“xim”“XInputMethod”“gtk20″“/usr/share/locale”“ko:ja:th:zh”
改成:
<!--<br/ /><br/ />Code highlighting produced by Actipro CodeHighlighter (freeware)<br/ />http://www.CodeHighlighter.com/<br/ /><br/ />-->“xim”“XInputMethod”“gtk20″“/usr/share/locale”“en:ko:ja:th:zh”
3.新建一个空文本文件 /etc/X11/Xsession.d/95fcitx_start
<!--<br/ /><br/ />Code highlighting produced by Actipro CodeHighlighter (freeware)<br/ />http://www.CodeHighlighter.com/<br/ /><br/ />-->sudogedit/etc/X11/Xsession.d/95fcitx_start
并粘贴如下内容:
<!--<br/ /><br/ />Code highlighting produced by Actipro CodeHighlighter (freeware)<br/ />http://www.CodeHighlighter.com/<br/ /><br/ />-->exportLC_CTYPE=zh_CN.UTF-8
exportXMODIFIERS=@im=fcitx
exportXIM=fcitx
exportXIM_PROGRAM=fcitx
fcitx
exportXMODIFIERS=@im=fcitx
exportXIM=fcitx
exportXIM_PROGRAM=fcitx
fcitx
并且赋予执行权限:
<!--<br/ /><br/ />Code highlighting produced by Actipro CodeHighlighter (freeware)<br/ />http://www.CodeHighlighter.com/<br/ /><br/ />-->sudochmod+x/etc/X11/Xsession.d/95fcitx_start
最后执行:
<!--<br/ /><br/ />Code highlighting produced by Actipro CodeHighlighter (freeware)<br/ />http://www.CodeHighlighter.com/<br/ /><br/ />-->sudoapt-getautoremove
注意:
1、在纯英文环境下(沒有安裝任何中文支持),可能做了如上修改後fcitx仍然显示方块,這就是你的电脑中沒有生成cn环境,可以进行如下修改以生成cn环境。
<!--<br/ /><br/ />Code highlighting produced by Actipro CodeHighlighter (freeware)<br/ />http://www.CodeHighlighter.com/<br/ /><br/ />-->sudogedit/var/lib/locales/supported.d/zh
加入如下內容:
<!--<br/ /><br/ />Code highlighting produced by Actipro CodeHighlighter (freeware)<br/ />http://www.CodeHighlighter.com/<br/ /><br/ />-->zh_SG.UTF-8UTF-8
zh_HK.UTF-8UTF-8
zh_TW.UTF-8UTF-8
zh_CN.UTF-8UTF-8
zh_CN.GB2312GB2312
zh_CN.GBKGBK
zh_CN.GB18030GB18030
zh_HK.Big5Big5
zh_TW.Big5Big5
zh_HK.UTF-8UTF-8
zh_TW.UTF-8UTF-8
zh_CN.UTF-8UTF-8
zh_CN.GB2312GB2312
zh_CN.GBKGBK
zh_CN.GB18030GB18030
zh_HK.Big5Big5
zh_TW.Big5Big5
然后执行:
<!--<br/ /><br/ />Code highlighting produced by Actipro CodeHighlighter (freeware)<br/ />http://www.CodeHighlighter.com/<br/ /><br/ />-->sudolocale-gen
生成可能要几分钟,这样的话,在纯英文环境中fcitx也可正常显示状态栏上的文字了。
本文介绍如何在纯英文版Ubuntu系统中安装并配置Fcitx中文输入法,包括安装Fcitx、编辑配置文件、生成中文环境等步骤。
4861

被折叠的 条评论
为什么被折叠?



