红联Linux门户
Linux帮助

Fedora 7 kde下的scim自动启动

发布时间:2007-08-02 10:08:50来源:红联作者:esources
前天装了F7,用的桌面环境是kde,发现scim没有随kde一起启动。网上找了一下,没有什么收获。

那就自己想办法了。迅速锁定目标,与X启动相关的文件。

later,终于被我发现了这个文件-----/etc/X11/xinit/Xclients

[root@localhost tgp]# cat /etc/X11/xinit/Xclients
#!/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.
GSESSION="$(which gnome-session 2>/dev/null)"
STARTKDE="$(which startkde 2>/dev/null)"
# check to see if the user has a preferred desktop
PREFERRED=
if [ -f /etc/sysconfig/desktop ]; then
. /etc/sysconfig/desktop
if [ "$DESKTOP" = "GNOME" ]; then
PREFERRED="$GSESSION"
elif [ "$DESKTOP" = "KDE" ]; then
PREFERRED="$STARTKDE"
fi
fi

if [ -n "$PREFERRED" ]; then
exec "$PREFERRED"
fi

# now if we can reach here, either no desktop file was present,
# or the desktop requested is not installed.

if [ -n "$GSESSION" ]; then
# by default, we run GNOME.
exec "$GSESSION"
elif [ -n "$STARTKDE" ]; then
# if GNOME isn't installed, try KDE.
export LANG=zh_CN.UTF-8
export LC_ALL=zh_CN.UTF-8
scim -d&
exec "$STARTKDE"

fi

# Failsafe.

# these files are left sitting around by TheNextLevel.
rm -f $HOME/Xrootenv.0

# Argh! Nothing good is installed. Fall back to twm
{
# gosh, neither fvwm95 nor fvwm2 is available;
# fall back to failsafe settings
[ -x /usr/bin/xsetroot ] && /usr/bin/xsetroot -solid '#222E45'

if [ -x /usr/bin/xclock ] ; then
/usr/bin/xclock -geometry 100x100-5+5 &
elif [ -x /usr/bin/xclock ] ; then
/usr/bin/xclock -geometry 100x100-5+5 &
fi
if [ -x /usr/bin/xterm ] ; then
/usr/bin/xterm -geometry 80x50-50+150 &
fi
if [ -x /usr/bin/firefox -a -f /usr/share/doc/HTML/index.html ]; then
/usr/bin/firefox /usr/share/doc/HTML/index.html &
fi
if [ -x /usr/bin/twm ] ; then
exec /usr/bin/twm
fi
}


这个文件的作用大概就是决定启用kde还是gnome。于是我在决定执行kde位置(这个因机而异)的地方加入locale等相关代码(见红字),终于OK。

我对X window不是很熟悉,但这也算是没办法的办法了。
文章评论

共有 0 条评论