`
phinecos
  • 浏览: 344995 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Ubuntu下安装Fcitx中文输入法

 
阅读更多

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

并且赋予执行权限:

<!--<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

然后执行:

<!--<br/ /><br/ />Code highlighting produced by Actipro CodeHighlighter (freeware)<br/ />http://www.CodeHighlighter.com/<br/ /><br/ />-->sudolocale-gen

生成可能要几分钟,这样的话,在纯英文环境中fcitx也可正常显示状态栏上的文字了。



分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics