LinuxSir.cn,穿越时空的Linuxsir!

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

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

[复制链接]
 楼主| 发表于 2004-6-19 21:59:56 | 显示全部楼层
那个rpm有问题。(见这个帖子第三页)

再把/etc/X11/xinit/xinitrc贴上来看看
发表于 2004-6-19 22:20:31 | 显示全部楼层
我重新启动了电脑,下面是运行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=

关于你说的/etc/X11/xinit/xinitrc.d/xinput这个文件,我这里有个问题,请你看看,以前我按照你的方法去修改xinput,但是我不会用vim编辑器修改,所以我就用gedit打开这个文件,查找了到了四个chinput名字,把它们换成了fcitx了,我又怕搞错了,于是又下载了你提供xinput文件,用gedit打开复制了里面的内容粘贴到了/etc/X11/xinit/xinitrc.d/xinput。但是现在我用gedit准备打开xinput时发现有好几个这样的文件,根本不知道打开哪一个了(见图1)。。。然后进到/etc/X11/xinit/xinitrc.d/这个目录发现只有两个文件(见图2),我是不是改错了?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
发表于 2004-6-19 22:22:32 | 显示全部楼层
这是图2

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2004-6-19 22:28:58 | 显示全部楼层
假设你下载的文件是xinput.txt,运行下面的命令,复制到/etc/X11/xinit/xinitrc.d下并删除~文件:
cp xinput.txt  /etc/X11/xinit/xinitrc.d/xinput ;cp -a /etc/X11/xinit/xinitrc.d /root/
rm /etc/X11/xinit/xinitrc.d/*~;rm /etc/X11/xinit/xinitrc.d/*.txt

另外你的locale有问题,改过i18n后真的没加别的参数?
关于fcitx的rpm有解决办法,仔细看这个帖子,那个rpm有问题。
发表于 2004-6-19 22:33:52 | 显示全部楼层
这是图2中看到的xinput.sh文件,我把它复制到桌面然后改后缀名为:xinput.txt,再打开一个txt文档后用gedit命令中的打开才能打开,不知道为什么总是找不到关联程序,所以只能这样了,你看看里面的内容:

#!/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 22:42:17 | 显示全部楼层
可是进入/etc/X11/xinit/xinitrc.d后根本就看不见其他的文件,只能用gedit打开这个命令才能看见,gedit又删除不了这几个文件,天啊,怎么会这样,太麻烦你了
 楼主| 发表于 2004-6-19 22:43:29 | 显示全部楼层
我写的那两句命令有没有运行?执行万后看看那个xinitrc.d目录下的文件正不正常,应该只有两个。

那个fcitx的rpm问题,看这个帖子的第三页
(我直接说吧)

//不要用root权限
rm $HOME/.gnome2/session-manual;rm $HOME/.kde/Autostart/fcitx

//用root权限
rm /etc/profile.d/input.sh

删除曾经加入的export XMODIFIERS="@im=fcitx"; export XIM=fcitx ;export XIM_PROGRAM=fcitx等类似的条目,然后进行第3部

还有,把/etc/X11/xinit/xinitrc贴上来,只有看看这个文件我才知道你的xinput要不要改名为xinput.sh
 楼主| 发表于 2004-6-19 22:47:29 | 显示全部楼层
很多操作要再虚拟终端下完成的。
红帽主菜单--系统工具--终端
这样打开虚拟终端,执行我说的那两句命令
cp xinput.txt /etc/X11/xinit/xinitrc.d/xinput ;cp -a /etc/X11/xinit/xinitrc.d /root/
rm /etc/X11/xinit/xinitrc.d/*~;rm /etc/X11/xinit/xinitrc.d/*.txt
发表于 2004-6-19 22:48:48 | 显示全部楼层
按照你这个:11.还有一个问题是安装了fcitx-2.0.2-4.noarch.rpm和站上提供的一个美化包后,gnome难以启动或者崩溃的问题

我查找了这几个文件夹,但是并没有发现有以下几个文件,是不是表示没有装fcitx-2.0.2-4.noarch.rpm?

session-manual
input.sh
Autostart/fcitx
 楼主| 发表于 2004-6-19 22:50:28 | 显示全部楼层
/etc/profile.d/input.sh有没有?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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