Wednesday, December 26, 2007

autostart scim under KDE4

Yesterday I installed KDE4 on my linux system. I wanted to automatically start the chinese input method support scim after log into the KDE4 desktop from kdm. I took some advices from internet and added .xim in my home directry. The content of the .xim is as follows:

export XMODIFIERS="@im=SCIM"
export GTK_IM_MODULE=scim
export QT_IM_SWITCHER=imsw-multi
export QT_IM_MODULE=scim
scim -d


However it didn't work. I checked the .xsession and found that the .xim was not called at all. After grepping in /etc, I found that KDE4 uses its own Xsession under /etc/kde4/kdm instead of the standard one under /etc/X11/xdm. After I added this line

[ -f $HOME/.xim ] && . $HOME/.xim

before calling startkde in the Xsession file, it worked like a charm!

1 comment:

Shriramana said...

Hello, I followed your instructions to the letter but I still am not getting scim to work on non-GTK applications. Are you using Ubuntu? Can you tell me what scim-related packages you have installed? Thanks in advance.