LinuxSir.cn,穿越时空的Linuxsir!

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

fcitx与zhcon的暧昧关系

[复制链接]
发表于 2004-1-25 08:41:24 | 显示全部楼层 |阅读模式
我已经报告了在slackware9.1中使用fcitx-2.0.1的奇怪问题,并且这始终是个问题,见:
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=86051
现在,我又发现了这样的奇怪现象:
当我以图形方式登陆时是进入gdm,然后是gnome,我能设置fcitx随会话一起启动,并且能正常输入中文,效果好极了,我就爱用fcitx。可是,如果从gdm进xfce或kde,那么就只有fcitx的输入框有用,数完汉字后,在框里有,但是当按空格键时,那该死的中文字就是跳不出来。
然而gnome会让我的机器死得很惨,(今天我又发现xfce也是,在能正常的在xfce中的mozilla1.6简体中文版中用fcitx打这篇东西之前,机器已经重启n次了    )
于是,我昨天晚上想,要是我从命令行启动X窗口会怎样呢?
改写.xinitrc,加入
export XMODIFIERS=@im=fcitx
fcitx
并且在.bash_rc中加入
export LANG=zh_CN.GB2312
(不是GBK,也不是gbk,在slackware9.1中我发现只有2312管用。)
退出登陆,再登陆,然后startx,发现不管在xfce,gnome,kde中都只能看见输入框,输入汉字后按空格键,汉字都不会跳出来,大写的英文子母倒是能按回车输入。
我百思不得其解,终于一个偶然的机会,我在命令行模式中进了zhcon,然后startx,奇迹出现了,无论在kde,gnome还是xfce都能输入汉字了,只有kde中不能在openoffice中输入汉字,konsole中就可以输入汉字。
今天早上,我兴冲冲的到学校,想在办公室的机器上也尝试家里的成功,然而令人沮丧的是xfce也像gnome一样死了,机器n次重启都不能恢复正常,然后我想到fcitx好像是在xft支持下编译的,我用了firefly的随slackware9.1发布的美化包,所以就在XF86Config中加入
Load    "xft"
重启,xfce活了,但是mozilla1.6老是死掉,于是我改为
Load   "xtt"
好了,进xfce后,mozilla不死了,我用fcitx输入到现在很正常,就是那个输入框老是把发贴的输入框的最下面的一行挡住,算是个bug吧。
我不知道明天重启机器会不会再次崩溃,想来slackware真的是bug多多,gxine全屏时要崩溃,我自己下载了源码编译才解决了问题,从源码编译的mplayer1.0pre3不能改变放映的画面尺寸,编译了2.6.1的内核后wine不能用了。
但是,我就是喜欢碰上这些麻烦事,我爱slackware,我爱fcitx.
发表于 2004-1-25 23:34:01 | 显示全部楼层
我家里的机器是slackware 9.0,公司的是9.1,都运行fcitx2.0.1,但是从来没有出现过兄弟说的情况。是不是你汉化的时候有什么没做好?我认为zhcon只是设置了一个locale,除此之外不应该对X系统有什么别的影响。你的locale设置是不是也有些问题?我一直是用zh_CN.gbk,完全正常。
 楼主| 发表于 2004-1-26 12:08:38 | 显示全部楼层

我也很奇怪

刚才我在回这个帖子时,gnome-panel再次崩溃,害得我很长的一段话化为乌有,好了,长话短说,这是我的uname -a
Linux changshi 2.4.22 #6 Tue Sep 2 17:43:01 PDT 2003 i686 unknown unknown GNU/Linux

.bash_profile
export PATH=$PATH:/usr/sbin:/sbin:/usr/local/mozilla
export G_BROKEN_FILENAMES=1
export LANG=zh_CN.GB2312
source .bash_rc

.bash_rcexport LANG=zh_CN.GB2312
zhcon


.xinitrc
#!/bin/sh

xsetroot -solid black -cursor_name watch

# hj_18 add
#export LANG=zh_CN.GB2312

# fix broken $UID on some system...
if test "x$UID" = "x"; then
        UID=`id -u`
fi

# Those are my settings, change them as appropriate...
# Xft DPI: 96
# Xft.hintstyle: hintnone/hintslight/hintmedium/hintfull
# Xft hinting: 1/0

xrdb -merge - << EOF
Xft.dpi: 96
Xft.hinting: 1
Xft.hintstyle: hintmedium
EOF

# Launch xscreensaver (if available), but only as non-root user
test $UID -gt 0 && xscreensaver -no-splash &

# hj_18 add
export XMODIFIERS=@im=fcitx
fcitx &


# Run xfce4-session if installed
xfcesm=`which xfce4-session`
case "x$xfcesm" in
        x|xno*)
                ;;
        *)
                exec $xfcesm
                # Shouldn't get there, but anyway...
                exit
                ;;
esac

# or use old-fashioned startup script otherwise
xfce-mcs-manager
xfwm4 --daemon

# Start-up stuff from ~/Desktop/Autostart directory, if it exists
# (as it seems to be the new standard)
if test -d "$HOME/Desktop/Autostart"; then
  for i in `ls -1 -L ${HOME}/Desktop/Autostart/ 2>/dev/null`; do
    if test -x $HOME/Desktop/Autostart/$i; then
      $HOME/Desktop/Autostart/$i &
    fi
  done
fi

if test -f $HOME/.Xmodmap; then
        xmodmap $HOME/.Xmodmap
fi

xftaskbar4&
xfdesktop&
panel=`which xfce4-panel`
case "x$panel" in
        x|xno*)
                ;;
        *)
                $panel
                ret=$?
                while test $ret -ne 0; do
                        xmessage -center -file - -timeout 20 -title Error <<EOF
A crash occured in the panel
Please report this to the xfce4-dev@moongroup.com list
Meanwhile the panel will be restarted
EOF
                        cat >&2 <<EOF
A crash occured in the panel
Please report this to the xfce4-dev@moongroup.com list
Meanwhile the panel will be restarted
EOF
                        $panel
                        ret=$?
                done
                ;;
esac

xsetroot -solid black -cursor_name watch

/etc/profile
# /etc/profile: This file contains system-wide defaults used by
# all Bourne (and related) shells.

# Set the values for some environment variables:
export MINICOM="-c on"
export MANPATH=/usr/local/man:/usr/man:/usr/X11R6/man
export HOSTNAME="`cat /etc/HOSTNAME`"
export LESSOPEN="|lesspipe.sh %s"
export LESS="-M"

# hj_18 add
export LC_ALL=zh_CN
#export LANG=zh_CN.GB2312
#export GTK_IM_MODULE=xim
export LESSCHARSET=iso8859
#export G_BORKEN_FILENAMES=1
#export XMODIFIERS=@im=fcitx

# If the user doesn't have a .inputrc, use the one in /etc.
if [ ! -r "$HOME/.inputrc" ]; then
  export INPUTRC=/etc/inputrc
fi

# Set the default system $PATH:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games"

# For root users, ensure that /usr/local/sbin, /usr/sbin, and /sbin are in
# the $PATH.  Some means of connection don't add these by default (sshd comes
# to mind).
if [ "`id -u`" = "0" ]; then
  echo $PATH | grep /usr/local/sbin 1> /dev/null 2> /dev/null
  if [ ! $? = 0 ]; then
    PATH=/usr/local/sbin:/usr/sbin:/sbinPATH
  fi
fi

# I had problems using 'eval tset' instead of 'TERM=', but you might want to
# try it anyway. I think with the right /etc/termcap it would work great.
# eval `tset -sQ "$TERM"`
if [ "$TERM" = "" -o "$TERM" = "unknown" ]; then
TERM=linux
fi

# Set ksh93 visual editing mode:
if [ "$SHELL" = "/bin/ksh" ]; then
  VISUAL=emacs
#  VISUAL=gmacs
#  VISUAL=vi
fi

# Set a default shell prompt:
#PS1='`hostname`:`pwd`# '
if [ "$SHELL" = "/bin/pdksh" ]; then
PS1='! $ '
elif [ "$SHELL" = "/bin/ksh" ]; then
PS1='! ${PWD/#$HOME/~}$ '
elif [ "$SHELL" = "/bin/zsh" ]; then
PS1='%n@%m:%~%# '
elif [ "$SHELL" = "/bin/ash" ]; then
PS1='$ '
else
PS1='\u@\h:\w\$ '
fi
PS2='> '
export PATH DISPLAY LESS TERM PS1 PS2

# Default umask.  A umask of 022 prevents new files from being created group
# and world writable.
umask 022

# Set up the LS_COLORS and LS_OPTIONS environment variables for color ls:
if [ "$SHELL" = "/bin/zsh" ]; then
eval `dircolors -z`
elif [ "$SHELL" = "/bin/ash" ]; then
eval `dircolors -s`
else
eval `dircolors -b`
fi

# Notify user of incoming mail.  This can be overridden in the user's
# local startup file (~/.bash.login or whatever, depending on the shell)
if [ -x /usr/bin/biff ]; then
biff y
fi

# Append any additional sh scripts found in /etc/profile.d/:
for file in /etc/profile.d/*.sh ; do
  if [ -x $file ]; then
    . $file
  fi
done

# For non-root users, add the current directory to the search path:
if [ ! "`id -u`" = "0" ]; then
PATH="$PATH:."
fi

xfree86 version
PACKAGE NAME:     xfree86-4.3.0-i486-5.Firefly
COMPRESSED PACKAGE SIZE:     15806 K
UNCOMPRESSED PACKAGE SIZE:     46990 K
PACKAGE LOCATION: /mnt/win_c/slk9.1/slkfont/xfree86-4.3.0-i486-5.Firefly.tgz
PACKAGE DESCRIPTION:
xfree86: xfree86 (XFree86 base package) -- with Firefly's CJK characters
xfree86:                                   display enhancement
xfree86:
xfree86: This is the base package for XFree86, and provides the required
xfree86: binaries, shared libraries, and support files (except fonts) to run
xfree86: X11R6 on Linux.
xfree86:
xfree86: It is modified with freetype-2.1.5, xft-2.1.2 and fontconfig-2.2.1.
xfree86: These packages are also patched by Firefly's CJK characters display
xfree86: enhancement latest patches by repackaging with explodepkg tools.
 楼主| 发表于 2004-1-26 12:10:54 | 显示全部楼层

不过我有了对付死机的办法

就是将/etc/random-seed改成不可写的,并注掉/etc/rc.d/rc.0(6)中回存random-seed的语句-------------希望管用。
发表于 2004-1-26 23:23:53 | 显示全部楼层
我没有用firefly的补丁,会不会是补丁的问题?
 楼主| 发表于 2004-1-27 14:40:31 | 显示全部楼层

是内存坏了

原来如此
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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