For CentOS4.
/etc/X11/xinit/xinitrc.d/xinput.sh
#export LC_ALL=”en_US.UTF-8″
export XMODIFIERS=@im=SCIM #case matters for this variable!
export GTK_IM_MODULE=xim
export QT_IM_MODULE=xim
#export GTK_IM_SCIM_CONFIG_MODULE=simple
export GTK_IM_SCIM_IMENGINE_MODULES=table