if [ -x /usr/bin/scim ]; then
# Enable legacy X applications to use scim:
export XMODIFIERS="@im=SCIM"
# Enable Qt/KDE applications to use scim:
export QT_IM_MODULE="scim"
export GTK_IM_MODULE="scim"
# Make scim start automatically if the "magic key" Ctrl-Space is pressed:
export XIM_PROGRAM="/usr/bin/scim -d"
fi