You are not logged in.
Hi. I've been trying to get scim to work in my KDE desktop to no avail, even after following instructions on the web. I've installed scim, scim-pinyin, scim-tables and skim. They seem to work in GTK applications such as Grsync, but not in any of the KDE applications. I cannot enter Chinese character in Firefox or Openoffice either.
Here is my .xinitrc file
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#
exec wmaker
#exec startkde
# exec icewm
# exec blackbox
# exec fluxbox
export XIM="SCIM"
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim
export XIM_PROGRAM="scim -d"
scim -f socket -c socket -d
I start kdm as a daemon to login, btw.
Can somebody pls tell me what I've done wrong? I'm getting desperate.
Last edited by ngch (2007-05-02 12:02:54)
Offline
This may or may not help....but I've had problems getting things to run in the past with sh scripts. Try changing the first line from "#!/bin/sh" to "#!/bin/bash" or whatever you're using as a shell.
Offline
add set in your ~/.xprofile 。 heh
just like this:
#more ~/.xprofile
export LANG="zh_CN.utf8"
export XMODIFIERS="@im=scim"
export GTK_IM_MODULE="scim"
export QT_IM_MODULE="scim"
export LC_CTYPE="zh_CN.utf8"
export XIM_PRGRAM="scim"
scim -d
The highest sounds are the hardest to hear. Going forward is a way to retreat. Greater talent shows itself late in life.
Offline
No dice, both doesn't work. Thx anyway.
Offline
Have you had a look at the official SCIM website (www.scim-im.org)?
This might help you from their wiki: http://www.scim-im.org/wiki/faq/kde_qt/ … plications
Offline
Has anyone figured out a solution to this problem. I also would love to use this distro but I must have Chinese input support.
Offline
The reason why your SCIM doesn't work in your original post is because
you activate SCIM AFTER you finish your windows manager...
BTW, I am not sure if KDM will invoke .xinitrc?
(because you said your desktop environment is "KDE", but in your .xinitrc, it is wmaker)
try to login into console, and use "startx" to get into desktop environment
or you may...
get into desktop environment,
start a terminal
start scim manually in the terminal (with option "-d")
and then... start firefox in the terminal
check it out.
good luck
Offline
I think I figured out the problem. I have to set my locale in /etc/rc.conf to "zh_CN.utf8", and rebooted. This works even though I login with kdm, so the issue is not likely to be with kdm.
After which the shortcut keys to activate it works like a charm. Unfortunately, many programs like Firefox will end up displaying Chinese characters, while the rest of the DE remains in English. Worse still, Openoffice's menus became a bundle of gibberish. I don't like it that way!
Any thing I can do to solve this? I like all my programs to be in English for consistency sake, cos my Chinese isn't that fantastic. :-p
Last edited by ngch (2007-04-23 12:04:12)
Offline
Make a file named xinput.sh (or you prefer) under /etc/profile.d/ with following content, then chmod +x so it will be automatically executed everytime system starts up.
export GTK_IM_MODULE="scim"
export QT_IM_MODULE="scim"
I think the problem you have is not related to locale, since SCIM support all UTF-8. Instead it's because SCIM doesn't get any IM setting if you start X through KDM. Anything changed I don't know makes your setting in .xinitrc is not executed.
Offline
Okay, I think I finally hit something. I uninstalled scim and skim, reset my ~/.xinitrc file and removed all other changes to my settings I had done to try to set up skim. The locale is set to "en_SG.utf8".
Then, I reinstalled scim, scim-pinyin and skim. I then created the xinput.sh file mentioned in the previous post by 'ganlu', and then restarted my computer.
After that, I actually can input Chinese into Firefox, grsync and other gtk applications with no problem. KDE applications, Opera and Openoffice still only accept English input though.
Another thing I have discovered; it seems like KDE 3.5 and QT3 applications in Arch are NOT able to work with scim. It says so on this old news page (http://www.archlinux.org/news/166/)
"Note that the QT (scim) support will be in QT4 and is not yet available."
Bummer. Is this the end of the road for my quest enable Chinese input in Arch KDE?
Offline
First, I don't use KDE as my desktop environment, but I think that doesn't matter.
I don't know what's wrong with your configuration, but with mine, I can input traditional chinese in Firefox, Openoffice and Opera.
So I just give you my configuration, and see if it helps.
/etc/rc.conf (partial)
LOCALE="zh_TW.utf8"
/etc/locale.gen
(which means that you could get the locale by commanding "locale -a"
ps. you need to generate locale manually*)
en_US.UTF-8 UTF-8
zh_TW.UTF-8 UTF-8
and I boot my system to level 5 and use XDM which will execute "~/.xsession"
and "~/.xsession" will just execute "~/.xinitrc"
(because "startx" will also execute "~/.xinitrc", I put my configuration mainly in "~/.xinitrc")
~/.xinitrc
#!/bin/sh
echo "Executing ~/.xinitrc..."
export XIM="SCIM"
export XMODIFIERS="@im=SCIM"
export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim
export XIM_PROGRAM="scim -d"export GDK_USE_XFT=1
export QT_XFT=trueexport BROWSER="/opt/mozilla/bin/firefox"
export TERMCMD="/opt/xfce4/bin/terminal"#scim -f socket -c socket -d
scim -dexec startxfce4
and that is all.
Last edited by bsdson.tw (2007-04-25 06:24:43)
Offline
Another thing I have discovered; it seems like KDE 3.5 and QT3 applications in Arch are NOT able to work with scim. It says so on this old news page (http://www.archlinux.org/news/166/). It says so on this old news page (http://www.archlinux.org/news/166/)
Can skim help? Or try to set your environment as XIM instead of "export QT_IM_MODULE="scim"", which means you have to add "export XMODIFIERS="@im=SCIM" in your xinput.sh.
Offline
Or fcitx?
Offline
im using gcin & kde, and everything doing ok.
export XMODIFIERS=@im=gcin
export LC_LANG=zh_TW.utf-8
export QT_IM_MODULES=gcin
gcin &
Offline
I installed skim, doesn't make a difference.
Changing the locale to "zh_TW.utf-8" does not help, only turns Firefox chinese-only and openoffice to complete gibberish.
So far, this is the content of my ~/.xprofile:
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE="scim"
export QT_IM_MODULE="scim"
scim -f socket -c socket -d
Tried using uim, turns out that it can only work with scim, bringing me back to square one again.
Then again, I am quite happy to get scim to work with Firefox though.
I haven't try all the solutions suggested though, so I'm still hanging on...
Offline
I tried Ganlu's method and it mostly works in Gnome. However, it somehow prevents Openoffice from starting.
Make a file named xinput.sh (or you prefer) under /etc/profile.d/ with following content, then chmod +x so it will be automatically executed everytime system starts up.
export GTK_IM_MODULE="scim"
export QT_IM_MODULE="scim"I think the problem you have is not related to locale, since SCIM support all UTF-8. Instead it's because SCIM doesn't get any IM setting if you start X through KDM. Anything changed I don't know makes your setting in .xinitrc is not executed.
Offline
I hit another thing; changing the locale to zh_**.utf8 DOES allow me to enter Chinese in KDE applications, but also messes up the interface of some programs like Openoffice.
Offline
Since devs have decided not to apply qtimm patch to official QT package, so to use SCIM with KDE apps, the current way is to use the XIM method and set QT_IM_MODULE to xim, you lost some SCIM features of course, but I think it will work.
export XMODIFIERS=@im=SCIM
export QT_IM_MODULE=xim
Good luck.
Offline
BINGO! I finally managed to enter Chinese characters in ALL my programs. Yeeha!
Thanks everyone for all your help and patience! Without all your help, I'll probably be stuck typing Chinese in XP.
These are all the steps I have taken:
1. Install "scim", "scim-pinyin" (pinyin input) and "skim"
2. Create .xprofile in my home folder (~/.xprofile) with the following text
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE=xim
export QT_IM_MODULE=xim
scim -f socket -c socket -d
3. Set SKIM to start automatically at login
4. Log out, Cltrl-Alt-Del and login again
This works if I login with kdm. Changing the locale does not seem necessary as it works with my locale set to "en_US.utf8"
Once again, thanks guys!
Last edited by ngch (2007-05-05 07:43:08)
Offline
Does this method also work while using OpenOffice?
Offline
yes, at least on my arch installation.
Offline
I think some people had problems calling the input method in KDE because Qt in Arch doesn't include qt-immodule. I applied the immodule patch and to gcin as well, then I can set QT_IM_MODULE=gcin without problem now.
My PKGBUILD:
pkgname=qt
pkgver=3.3.8
pkgrel=3
pkgdesc="The QT gui toolkit."
arch=(i686 x86_64)
url="http://www.trolltech.com/products/qt/index.html"
pkgfqn=${pkgname}-x11-free-${pkgver}
install=qt.install
depends=('libpng' 'libjpeg' 'libxmu' 'libxcursor' 'libxinerama' 'mesa' \
'libxft' 'libxrandr')
makedepends=('mysql' 'postgresql>=8.2.3' 'sqlite3' 'unixodbc' 'libmng')
source=(ftp://ftp.trolltech.com/qt/source/${pkgfqn}.tar.gz qt.profile \
qt-copy-kde-patches.tar.bz2 qt-patches.tar.bz2 utf8-bug-qt3.diff \
qt-font-default-subst.diff \
qt-x11-immodule-unified-qt3.3.8-20070321-gentoo.diff.bz2 \
qt-add-bold-style-for-missing-font.patch.gz)
# qt-copy-kde-patches come from http://websvn.kde.org/trunk/qt-copy/patches/
# other qt-patches come from fedora and gentoo
build() {
export QTDIR=$startdir/src/$pkgfqn
export PATH=${QTDIR}/bin:${PATH}
export LD_LIBRARY_PATH=${QTDIR}/lib:${LD_LIBRARY_PATH}
cd $startdir/src/$pkgfqn
# apply qt patches from kde.org
for i in ../qt-copy-kde-patches/*; do
patch -Np0 -i $i || return 1
done
# apply other qt patches and one security fix from debian/gentoo
for i in ../qt-patches/*; do
patch -Np1 -i $i || return 1
done
# fix utf8 bug
patch -Np0 -i ../utf8-bug-qt3.diff || return 1
# fix asia fonts
patch -Np0 -i ../qt-font-default-subst.diff || return 1
# apply immodule patch
patch -Np1 -i ../qt-x11-immodule-unified-qt3.3.8-20070321-gentoo.diff
# add bold style for fonts missing it
patch -Np1 -i ../qt-add-bold-style-for-missing-font.patch
# start compiling qt
sed -i 's|-cp -P -f|-cp -L -f|' qmake/Makefile.unix
rm -rf doc/html examples tutorial
sed -i "s|sub-tutorial sub-examples||" Makefile
sed -i "s|-O2|$CXXFLAGS|" mkspecs/linux-g++/qmake.conf
sed -i "s|-I. |$CXXFLAGS -I. |" qmake/Makefile.unix
sed -i "s|read acceptance|acceptance=yes|" configure
if [ "$CARCH" = "x86_64" ]; then
export ARCH="-64"
else unset ARCH
fi
sh make-symlinks.sh
./configure -prefix /opt/qt -platform linux-g++$ARCH \
-system-zlib -qt-gif -release -shared -sm -nis -thread -stl \
-{system-lib,plugin-imgfmt-}{png,jpeg,mng} \
-no-g++-exceptions -plugin-sql-{mysql,psql,sqlite,odbc}
# fix /opt/qt/lib path
[ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" $startdir/src/$pkgfqn/src/Makefile
[ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" $startdir/src/$pkgfqn/tools/designer/designer/Makefile
[ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" $startdir/src/$pkgfqn/tools/designer/editor/Makefile
[ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" $startdir/src/$pkgfqn/tools/assistant/lib/Makefile
[ "$CARCH" = "x86_64" ] && sed -i "s|/opt/qt/lib64|/opt/qt/lib|g" $startdir/src/$pkgfqn/tools/designer/uilib/Makefile
cd $startdir/src/$pkgfqn
make -C qmake || return 1
cd $startdir/src/$pkgfqn/plugins/src/sqldrivers/mysql
$startdir/src/$pkgfqn/bin/qmake -o Makefile "INCPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/mysql -lmysqlclient" mysql.pro
cd $startdir/src/$pkgfqn/plugins/src/sqldrivers/psql
$startdir/src/$pkgfqn/bin/qmake -o Makefile "INCPATH+=/usr/src/include /usr/include/postgresql/server" "LIBS+=-L/usr/lib -lpq" psql.pro
cd $startdir/src/$pkgfqn
# fix the broken makefiles
#sed -i 's|[[:space:]]*strip.*doc/html.*$|#|g' src/Makefile
make || return 1
make INSTALL_ROOT=$startdir/pkg install
rm -rf `find $startdir/pkg/opt/qt/mkspecs/* | grep -v linux-g++$ARCH`
rm -rf $startdir/pkg/opt/qt/{phrasebooks,templates,translations}
sed -i "s|-L$startdir/src/$pkgfqn/lib ||g" $startdir/pkg/opt/qt/lib/*.prl
install -D -m755 qmake/qmake $startdir/pkg/opt/qt/bin/qmake
install -D -m755 $startdir/qt.profile $startdir/pkg/etc/profile.d/qt.sh
[ "$CARCH" = "x86_64" ] && sed -i "s|linux-g++|linux-g++-64|g" $startdir/pkg/etc/profile.d/qt.sh
rm -f $startdir/pkg/opt/qt/mkspecs/linux-g++$ARCH/linux-g++$ARCH
# install man pages
mkdir -p $startdir/pkg/opt/qt/man
cp -r $startdir/src/$pkgfqn/doc/man/{man1,man3} $startdir/pkg/opt/qt/man/
#libtoolslay
find $startdir/pkg -name '*.la' -exec rm {} \;
# Arch64 fix
if [ "$CARCH" = "x86_64" ]; then
mkdir $startdir/pkg/opt/qt/mkspecs/linux-g++
cd $startdir/pkg/opt/qt/mkspecs/linux-g++
ln -s -v ../linux-g++-64/* .
fi
}
Offline
If I recall correctly, there was a release of Qt with the qt-immodule included, but it was quickly removed because it broke binary compatibility.
Some PKGBUILDs: http://members.lycos.co.uk/sweiss3
Offline
These are all the steps I have taken:
1. Install "scim", "scim-pinyin" (pinyin input) and "skim"
2. Create .xprofile in my home folder (~/.xprofile) with the following textexport XMODIFIERS=@im=SCIM export GTK_IM_MODULE=xim export QT_IM_MODULE=xim scim -f socket -c socket -d
3. Set SKIM to start automatically at login
4. Log out, Cltrl-Alt-Del and login againThis works if I login with kdm. Changing the locale does not seem necessary as it works with my locale set to "en_US.utf8"
Once again, thanks guys!
Anyone else still have problems with this? I put the above in .xinitrc and scim doesnt work at all. If I replace xim with scim it works for gtk but not qt. I have qt4 4.3.2-1 and qt-enhanced 3.3.8-13. I do not use kdm or kde
Linux user #403491
"Men have called me mad; but the question is not yet settled, whether madness is or is not the loftiest intelligence– whether much that is glorious– whether all that is profound– does not spring from disease of thought– from moods of mind exalted at the expense of the general intellect." - E. A. Poe from Eleonora
Offline
I have just solved my problem of Korean input under KDE yesterday. I'm pretty sure it'll work for Chinese input.
Instead of having the export in .x*, i put:
export XMODIFIERS=@im=SCIM
export LC_CTYPE="ko_KR.UTF-8"
export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim
into .bashrc
I have qt 3.3.8-5, qt4 4.3.2-1, scim, scim-hangul, skim installed. and my locale is set to en_US.utf8.
Good luck!
Offline