LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: hupeng923

FC2确实非常不错!附简要调整过程(关于locale和输入法的问题,好象大家没抓住关键哦)

[复制链接]
发表于 2004-6-19 11:23:00 | 显示全部楼层
感谢hupeng923,美化问题很完美
建议大家做完后重启,我的XMMS做完后界面变成乱码,重启就好了
发表于 2004-6-19 11:25:09 | 显示全部楼层
fcitx经常导致死机。刚按你的方法删改了一些文件,没做美化(哈密瓜的美化导致很多问题,让我重装了一次系统)

bash的命令输出有中文是乱码的毛病也没了, 这实在太好了,我不用跳到console下

不过有个问题:
ls --help > ls-help
file ls-help显示ls-help: ISO-8859 English text其实里面是中文
但是less ls-help提示
"ls-help" may be a binary file.  See it anyway?
more ls-help则没问题

另外
man页中don't中的'是乱码Don<E2><80><99>t

还有startx后显示一个警告信息:
/usr/share/rhn/rhn_applet/rhn_applet.py:362: DeprecationWarning: integer argument expected, got float
  self.animate_timeout_tag = gtk.timeout_add(math.floor(1000 * ANIMATION_TOTAL_TIME/len(frames)), self.animate_handler)
                                                                                
和你下面这段有没关系


6.下面这个文件可以改一下:
#/etc/gtk/gtkrc.zh_CN
style "gtk-default-zh-cn" {
fontset="-adobe-helvetica-medium-r-normal-*-*-120-*-*-p-*-viscii1.1-1,-misc-simsun-medium-r-normal-*-*-120-*-*-c-*-koi8-r"
}
class "GtkWidget" style "gtk-default-zh-cn"
 楼主| 发表于 2004-6-19 13:17:30 | 显示全部楼层
最初由 briwis 发表

不过有个问题:
ls --help > ls-help
file ls-help显示ls-help: ISO-8859 English text其实里面是中文
但是less ls-help提示
"ls-help" may be a binary file.  See it anyway?
more ls-help则没问题

不明白你这么操作的含义;不过在我的非FC2系统上按照你这样的操作结果也是你说的这样。

其它的问题,比如gtk,你可以把系统默认的配置文件恢复过去测试一下
 楼主| 发表于 2004-6-19 17:23:50 | 显示全部楼层

[Tips]为什么改了/etc/X11/xinit/xinitrc.d/xinput后仍不能自动启动fcitx?

原因:大概是删除了Iiimf后系统修改了配置文件,只执行xinitrc.d内以.sh结尾的可执行文件。
解决办法:修改/etc/X11/xinit/xinitrc.d/xinput后把xinput改名xinput.sh即可
发表于 2004-6-19 21:12:35 | 显示全部楼层
hupeng923兄,我按照你说的方法,就是第一项:1.首先,删掉IIim程序;和第三项:3.关于输入法的安装和locale的更改。但是fcitx还是不能自己启动,我也把xinput改名xinput.sh了,我把几个文件放上来你看看对不对,我用的是fcitx2.02,
这是locale的:
LANG=zh_CN.UTF-8
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=

还有xinput:

#!/bin/bash
# Copyright (C) 1999 - 2004 Red Hat, Inc. All rights reserved. This
# copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the
# GNU General Public License version 2.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# XIM( X Input Method ) script
#
# Original Korean support contributed by:
#        Won-kyu Park <wkpark@chem.skku.ac.kr>
#

oldterm=$TERM
unset TERM
# Load up the user and system locale settings
if [ -r /etc/profile.d/lang.sh ]; then
  . /etc/profile.d/lang.sh
fi
export TERM=$oldterm

tmplang="en_US"
#if test x$GDM_LANG != x ; then
#    tmplang=$GDM_LANG
if [ -n "$LC_ALL" ]; then
    tmplang=$LC_ALL
elif [ -n "$LC_CTYPE" ]; then
    tmplang=$LC_CTYPE
elif [ -n "$LANG" ]; then
    tmplang=$LANG
elif [ -r /etc/sysconfig/i18n ]; then
    . /etc/sysconfig/i18n
    tmplang=$LANG
fi

#
# check to see if the user has a preferred desktop
#

PREFERRED=

# runlevel 5 - checks which session manager it will load
# runlevel 3 - checks which desktop manager it will load
if [ -f /etc/sysconfig/desktop ]; then
# WARNING: This grep regex can be combined when someone has copious spare time.
if grep -q "GNOME" /etc/sysconfig/desktop 2>/dev/null || grep -q "\"\"" /etc/sysconfig/desktop 2>/dev/null; then
         # runlevel 5 with gdm - checks for $GDMSESSION and set the $PREFERRED
         if [ "$GDMSESSION" = "Default" ]; then
                 PREFERRED=gnome
         elif [ "$GDMSESSION" = "GNOME" ]; then
                 PREFERRED=gnome
         elif [ "$GDMSESSION" = "KDE" ]; then
                 PREFERRED=kde
         else
                 # applies if no env and runlevel 3
                 PREFERRED=gnome
         fi
elif grep -q "KDE" /etc/sysconfig/desktop 2>/dev/null; then

        if [ -z $1 -o "$1" = "default" ]; then
                 # applies if no arg passed by kdm and runlevel 3
                 PREFERRED=kde
        else
                 # otherwise assign $PREFERRED from arg
                 PREFERRED=$1
        fi
fi
fi

if [ -z "$PREFERRED" ]; then

        GSESSION=gnome-session
        STARTKDE=startkde

        # by default, we run GNOME.
        if which "$GSESSION" > /dev/null 2>&1; then
                PREFERRED=gnome
        fi

        # if GNOME isn't installed, try KDE.
        if which "$STARTKDE" > /dev/null 2>&1; then
                PREFERRED=kde
        fi
fi


#
# check $XIM and set a default $XIM value.
#

# default to iiim if htt server is running
if [ -z "$XIM" ]; then
    case $tmplang in ( ar* | be* | ja* | ko* | th* | zh* | *_IN* )
        if /sbin/service IIim status 2>/dev/null | /bin/grep -q pid ; then
          XIM=htt
        fi
        ;;
    esac

fi

# otherwise revert to legacy XIM client
if [ -z "$XIM" ]; then
    case $tmplang in
        ja*)
# WARNING: This binary should be in /usr/bin, not in /usr/X11R6/bin, because
# /usr/X11R6/bin is strictly for software supplied as an official part of
# X11R6, not for random applications to drop files in.
            if [ -x /usr/X11R6/bin/xwnmo ]; then
                    XIM="_XWNMO"
            elif [ -x /usr/bin/uim-xim ]; then
                    XIM="uim"
# WARNING: This binary should be in /usr/bin, not in /usr/X11R6/bin, because
# /usr/X11R6/bin is strictly for software supplied as an official part of
# X11R6, not for random applications to drop files in.
            elif [ -x /usr/X11R6/bin/kinput2 ]; then
                    XIM="kinput2"
# WARNING: This binary should be in /usr/bin, not in /usr/X11R6/bin, because
# /usr/X11R6/bin is strictly for software supplied as an official part of
# X11R6, not for random applications to drop files in.
            elif [ -x /usr/X11R6/bin/skkinput ]; then
                    XIM="skkinput"
            fi
        ;;
        ko*)
            if [ -x /usr/bin/nabi ]; then
                    XIM="nabi"
            elif [ -x /usr/bin/ami ]; then
                    XIM="Ami"
            elif [ -x /usr/bin/hanIM ]; then
                    XIM="hanIM"
            fi
        ;;
        zh_CN*)
            if [ -x /usr/bin/fcitx ]; then
                XIM="Chinput"
            fi
        ;;
        zh_TW*)
# WARNING: This binary should be in /usr/bin, not in /usr/X11R6/bin, because
# /usr/X11R6/bin is strictly for software supplied as an official part of
# X11R6, not for random applications to drop files in.
            if [ -x /usr/X11R6/bin/xcin ]; then
                XIM="xcin"
            fi
        ;;
    esac
fi

#
# set a proper XIM program with respect to $XIM
#
if [ -z "$XIM_PROGRAM" ]; then
   case "$XIM" in
      Ami)
        case "$PREFERRED" in
           kde)
                if which wmami >/dev/null 2>&1 ; then
                        XIM_PROGRAM=wmami
                        XIM_ARGS="-wait"
                elif which ami >/dev/null 2>&1 ; then
                        XIM_PROGRAM=ami
                fi
                ;;
           *)
                if which ami >/dev/null 2>&1 ; then
                        XIM_PROGRAM=ami
                fi
                ;;
        esac
        ;;
      Chinput)
        XIM_PROGRAM=fcitx
        ;;
      hanIM)
        if which hanIM >/dev/null 2>&1 ; then
                XIM_PROGRAM=hanIM
        fi
        ;;
      htt)
        XIM_PROGRAM=httx
        ;;
      kinput2)
        XIM_PROGRAM=kinput2
        if [ -z "$XIM_ARGS" ]; then
            if /usr/bin/cannaping 2>/dev/null ; then
                XIM_ARGS="-canna +kinput -xim"
            elif /sbin/service FreeWnn status 2>/dev/null | /bin/grep -q pid
            then
                XIM_ARGS="-wnn +kinput -xim"
            else
                XIM_ARGS="+kinput -xim"
            fi
        fi
        ;;
      nabi)
        XIM_PROGRAM=nabi
        ;;
      skkinput)
        XIM_PROGRAM=skkinput
        ;;
      uim)
        XIM_PROGRAM=uim-xim
        ;;
      _XWNMO)
        XIM_PROGRAM=xwnmo
        ;;
      xcin)
        XIM_PROGRAM=xcin
        XIM_ARGS="-x xcin"
        ;;
      *)
        XIM_PROGRAM=/bin/true
        ;;
   esac
fi

# set default gtk IM module
if [ -z "$GTK_IM_MODULE" ]; then
   case "$XIM" in
      htt)
        GTK_IM_MODULE=iiim
         ;;
   esac
fi
[ -n "$GTK_IM_MODULE" ] && export GTK_IM_MODULE

# setup XMODIFIERS
[ -z "$XMODIFIERS" -a -n "$XIM" ] && export XMODIFIERS="@im=$XIM"

# execute XIM_PROGRAM
which "$XIM_PROGRAM" > /dev/null 2>&1 && LANG="$tmplang" "$XIM_PROGRAM" $XIM_ARGS &
发表于 2004-6-19 21:15:44 | 显示全部楼层
我也改了/etc/sysconfig/i18n:
LANG="zh_CN.gbk"
SUPPORTED="zh_CN.gbk:zh_CN:zh"
SYSFONT="latarcyrheb-sun16"
 楼主| 发表于 2004-6-19 21:32:53 | 显示全部楼层
文件没有问题。不过改了i18n为gbk后,locale不可能还是UTF-8的。是不是还在别的地方加了参数?另外你的fcitx是rpm装的还是编译安装的?
发表于 2004-6-19 21:48:15 | 显示全部楼层
我的fcitx编译安装的,好象没有在别处加参数了
 楼主| 发表于 2004-6-19 21:52:14 | 显示全部楼层
重启x了吗?运行一下locale命令,贴上结果;再把/etc/X11/xinit/xinitrc贴上来看看
发表于 2004-6-19 21:54:37 | 显示全部楼层
不过以前在KDE中装过一次fcits,是rpm安装的,但是不知道成功了没有,因为CTRL+空格后输入法并没有出来,于是我就没有在进KDE了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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