采用以下方法可以让console显示英文,同时保持xwindow为中文(也可以设置xwindow用英文),适用于redhat 8/9和fedora,其它使用sysconfig/i18n的发行版,如debian,只有profile文件位置不同,也可以同样用。 mandrake不需要,默认已经支持了。
1 编辑/etc/sysconfig/i18n,在文件最后添加
CONSOLE_NOT_LOCALIZED="yes" #如果希望console用英文,设置为yes
X11_NOT_LOCALIZED = "no" #如果希望xwindow用英文,设置为yes
2 编辑/etc/profile.d/lang.sh, 在文件末尾附近找到下面行,加入################之间的行
[CODE]
if [ -n "$LANG" ]; then
case $LANG in
*.utf8*|*.UTF-8*)
if [ "$TERM" = "linux" -a "`/sbin/consoletype`" = "vt" ]; then
[ -x /bin/unicode_start ] && /sbin/consoletype fg && unicode_start $SYSFONT $SYSFONTACM
fi
;;
esac
fi
unset SYSFONTACM SYSFONT
###########################
#添加下面几行
if [ -n "$DISPLAY" ]; then
[ "$X11_NOT_LOCALIZED" = "yes" ] && LANGUAGE=C
elif [ -z "$DESKTOP" ]; then
[ "$CONSOLE_NOT_LOCALIZED" = "yes" ] && LANGUAGE=C
fi
[ -n "$LANGUAGE" ] && export LANGUAGE
#添加行结束
###########################
fi
unset sourced
unset langfile
[/CODE]
3 退出重新登陆,OK
采用以下方法可以让console显示英文,同时保持xwindow为中文(也可以设置xwindow用英文)
最新推荐文章于 2022-08-17 16:48:23 发布