ubuntu 中文

来源:互联网 发布:android 网络抓包工具 编辑:程序博客网 时间:2024/04/29 21:53

1、自带ibus输入法

2、fcitx输入法
由于ibus的缺陷,所以我尝试了fcitx,使用下来也非常不错,而且可以在Java程序中正常使用,只是在这种情况下光标跟随有些问题,输入界面会停留在屏幕最下端,但是可以接受,比起ibus不能使用要好多了。

安装fcitx:
sudo apt-get install fcitx

启动fcitx:
im-switch -s fcitx

注销后重新登录,fcitx就会生效。
如果需要切换回ibus,可以运行im-switch -s ibus,然后注销,重新登录。

fcitx同样可以通过Ctrl + 空格调出,这时会发现fcitx显示的中文是方框,因此需要修改fcitx的配置。Fcitx的配置文件在~/.fcitx/config,该文件为 GBK编码,在Ubuntu下显示不正常,可以通过如下方式操作:
cd ~/.fcitx
iconv -f gbk -t utf8 config > config.tmp

编辑config.tmp文件:
显示字体(中)=WenQuanYi Micro Hei

显示字体大小=10

使用粗体=0


保存退出,然后运行命令:
iconv -f utf8 -t gbk config.tmp > config

注销后重新登录,fcitx显示正常。

 

 

就是要你把这堆东西粘贴到/etc/apt/source.list里头,然后再apt-get install fcitx.

deb http://ubuntu.cn99.com/ubuntu/ breezy main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ breezy-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ breezy-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ breezy main restricted universe multiverse
deb http://ubuntu.cn99.com/backports/ breezy-extras main restricted universe multiverse

 

==================================================================================

ubuntu/linux flash中文乱码 的解决
打开配置文件:
cd /etc/fonts/conf.d/
sudo gedit 49-sansserif.conf

修改edit节点,将<string>sans-serif</string>
改为 <string>sans</string>

<match target="pattern">
<test qual="all" name="family" compare="not_eq">
<string>sans-serif</string>
</test>
<test qual="all" name="family" compare="not_eq">
<string>serif</string>
</test>
<test qual="all" name="family" compare="not_eq">
<string>monospace</string>
</test>
<edit name="family" mode="append_last">
<string>sans-serif</string> 这里改为<--- <string>sans</string>
</edit>
</match>