LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1948|回复: 17

求救!重装了arch又死活不显示中文了!

[复制链接]
发表于 2006-3-26 13:54:52 | 显示全部楼层 |阅读模式
我是这样做的
光盘安装arch base 0.7.1
pacman -Syu 更新
更新完后
pacman -S kde
pacman -S kde-i18n-zh_cn
pacman -S xorg
pacman -S hwd
用hwd创建/etc/X11/xorg.conf文件

修改/etc/rc.conf locale那行
locale=zh_CN.UTF-8

修改~/.xinitrc 去掉注释
exec startkde

修改~/.bashrc 添加
export LANG=zh_CN.utf8
export LC_ALL=zh_CN.utf8

这个时候应该可以直接startx进xwindows了,但肯定是方块了,因为我装了kde-i18n-zh_cn
我是想直接进去就是中文的,所以直接就按照 tx-cary 老大的方法:
  1. pacman -S ttf-fireflysung
  2. cd /usr/share/fonts/TTF/
  3. mkfontscale
  4. mkfontdir
  5. fc-cache -f
复制代码

先安装字体,使其默认能够显示中文字体再说,但是安装 ttf-fireflysung 的时候出现问题:

  1. [root@ccnu-blance ~]# pacman -S ttf-fireflysung
  2. :: ttf-fireflysung-1.3.0-1: is up to date.  Upgrade anyway? [Y/n] y

  3. Targets: ttf-fireflysung-1.3.0-1

  4. Total Package Size:   6.8 MB

  5. Proceed with upgrade? [Y/n] y

  6. checking package integrity... done.
  7. loading package data... done.
  8. checking for file conflicts... done.
  9. upgrading ttf-fireflysung... done.
  10. Updating font cache... /var/lib/pacman/local/ttf-fireflysung-1.3.0-1/install: line 6: /usr/X11R6/bin/mkfontdir: Permission denied
  11. /var/lib/pacman/local/ttf-fireflysung-1.3.0-1/install: line 7: /usr/X11R6/bin/mkfontscale: Permission denied
  12. cp: cannot stat `../encodings/encodings.dir': No such file or directory
  13. done.
  14. [root@ccnu-blance ~]#
复制代码

没办法,只有安装其它字体了,但是结果是无论怎么进X,都是方块,必须在字体里面选择一个中文字体才会显示中文,郁闷啊,以前用默认的sans字体没有问题的啊
发表于 2006-3-26 15:22:50 | 显示全部楼层
ttf-fireflysung
的安装脚本很久没更新了 可以提醒一下维护者
回复 支持 反对

使用道具 举报

发表于 2006-3-26 18:31:34 | 显示全部楼层
我使用gnome,没发现这个问题,
我也就只安装了fireflysung
回复 支持 反对

使用道具 举报

发表于 2006-3-26 19:20:23 | 显示全部楼层
建议还是去官方看wiki
这个版上面好多的东西现在都不能用了
太旧了啊
你的问题应该和我一开始一样
还是locale的问题吧
回复 支持 反对

使用道具 举报

发表于 2006-3-26 19:21:33 | 显示全部楼层
使用locale.gen添加你的locale了吗?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-27 10:21:06 | 显示全部楼层
i don't check it,but dele # at the front of zh_CN.UTF-8 ?
also i see the fcitx tool but don't use it.it's ashen.

when i typed,this is the shell showed:
[root@ccnu-blance ~]# locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
POSIX
en_US.utf8
[root@ccnu-blance ~]#
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-27 10:26:40 | 显示全部楼层
/etc/profile

  1. #
  2. # /etc/profile
  3. #

  4. export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin"

  5. export MANPATH="/usr/man:/usr/X11R6/man"
  6. export LESSCHARSET="latin1"
  7. export INPUTRC="/etc/inputrc"
  8. export LESS="-R"

  9. # Locale settings (find your locale with 'locale -a')
  10. export LANG=zh_CN.utf8
  11. export LC_ALL=zh_CN.utf8
  12. export LC_COLLATE="C"

  13. export XMODIFIERS=@im=FCITX
  14. export GTK_IM_MODULE=fcitx
  15. export QT_IM_MODULE=fcitx

  16. export COLUMNS LINES

  17. export PS1='[\u@\h \W]\$ '
  18. export PS2='> '

  19. umask 000

  20. if [ "$TERM" = "xterm" -o "$TERM" = "xterm-color" -o "$TERM" = "rxvt" -o "$TERM" = "xterm-xfree86" ]; then
  21.   PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
  22. fi

  23. # load profiles from /etc/profile.d
  24. #  (to disable a profile, just remove execute permission on it)
  25. for profile in /etc/profile.d/*.sh; do
  26.   if [ -x $profile ]; then
  27.     . $profile
  28.   fi
  29. done
  30. unset profile

  31. # End of file

复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-27 10:40:37 | 显示全部楼层
不好意思,英文水平有限。都怪当初中学没有学好英语:)

反正我是去掉了locale.gen里面在zh_CN.UTF-8那行前面的#号(上一次发贴问汉化问题时候,我也没有动过这个文件照样汉化了的)
同时修改了/etc/profile文件如上(不修改也不显示,修改也不显示)

再简单说,我就是没有格式化/home,直接重新装系统,并挂在到home用的,再替换/etc/fonts下两个配置文件并跟上次一样修改/etc/rc.conf里面的locale就应该可以吧?可是就是不显示中文
除非不用BVS字体,问题是不用BVS字体虽中文字显示正常,可是fcitx不能输入了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-27 10:42:49 | 显示全部楼层
还有那个zh_CN.utf8弄得我头大
不知道zh_CN.UTF-8和zh_CN.utf8有何区别?我都设置了试过,中文字时方块的还是方块
回复 支持 反对

使用道具 举报

发表于 2006-3-27 12:24:34 | 显示全部楼层
我也遇到过这个问题,不过我用的是gnome。只能够先安装字体,然后选择字体,才正常显示。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表