File scim.config of Package scim
#! /bin/sh
# scim.config : this script will set the default KeyboardLayout setting of scim according to the system keyboard setting.
#
# check if we are started as root
# only one of UID and USER must be set correctly
test -n "$UID" || UID="$(id -ru)"
if test "$UID" != 0 -a "$USER" != root; then
echo "You must be root to start $0."
exit 1
fi
test -n "$ROOT" && exit 0
CONFIG_FILE="/etc/scim/global"
CONFIG_KEY="/DefaultKeyboardLayout"
test ! -e $CONFIG_FILE && exit 0
# Read system keyboard setting
test -e /etc/sysconfig/keyboard && . /etc/sysconfig/keyboard
case ${YAST_KEYBOARD%%,*} in
english-us)
SCIM_KEYBOARD="US_Default"
;;
english-uk)
SCIM_KEYBOARD="UK"
;;
german)
SCIM_KEYBOARD="German"
;;
german-deadkey)
SCIM_KEYBOARD="German_Deadkeys"
;;
german-ch)
SCIM_KEYBOARD="German_Swiss"
;;
french)
SCIM_KEYBOARD="French"
;;
french-ch)
SCIM_KEYBOARD="French_Switzerland"
;;
french-ca)
SCIM_KEYBOARD="French_Canadian"
;;
spanish)
SCIM_KEYBOARD="Spanish"
;;
spanish-lat)
SCIM_KEYBOARD="Spanish_Latin_America"
;;
spanish-lat-cp850)
SCIM_KEYBOARD="Spanish_CP850"
;;
italian)
SCIM_KEYBOARD="Italian"
;;
portugese)
SCIM_KEYBOARD="Portuguese"
;;
portugese-br)
SCIM_KEYBOARD="Portuguese_Brazil"
;;
portugese-br-usa)
SCIM_KEYBOARD="Portuguese_Brazil_US_Accents"
;;
greek)
SCIM_KEYBOARD="Greek"
;;
dutch)
SCIM_KEYBOARD="Dutch"
;;
danish)
SCIM_KEYBOARD="Danish"
;;
norwegian)
SCIM_KEYBOARD="Norwegian"
;;
swedish)
SCIM_KEYBOARD="Swedish"
;;
finnish)
SCIM_KEYBOARD="Finnish"
;;
czech)
SCIM_KEYBOARD="Czech"
;;
czech-qwerty)
SCIM_KEYBOARD="Czech_Qwerty"
;;
slovak)
SCIM_KEYBOARD="Slovak"
;;
slovak-qwerty)
SCIM_KEYBOARD="Slovak_Qwerty"
;;
slovene)
SCIM_KEYBOARD="Slovene"
;;
hungarian)
SCIM_KEYBOARD="Hungarian"
;;
polish)
SCIM_KEYBOARD="Polish"
;;
russian)
SCIM_KEYBOARD="Russian"
;;
estonian)
SCIM_KEYBOARD="Estonian"
;;
lithuanian)
SCIM_KEYBOARD="Lithuanian"
;;
turkish)
SCIM_KEYBOARD="Turkish"
;;
croatian)
SCIM_KEYBOARD="Croatian"
;;
japanese)
SCIM_KEYBOARD="Japanese"
;;
belgian)
SCIM_KEYBOARD="Belgian"
;;
dvorak)
SCIM_KEYBOARD="Dvorak"
;;
icelandic)
SCIM_KEYBOARD="Icelandic"
;;
ukrainian)
SCIM_KEYBOARD="Ukrainian"
;;
*)
SCIM_KEYBOARD="Unknown"
esac
cat $CONFIG_FILE | grep -v $CONFIG_KEY > ${CONFIG_FILE}.new
echo "$CONFIG_KEY = $SCIM_KEYBOARD" >> ${CONFIG_FILE}.new
mv -f ${CONFIG_FILE}.new ${CONFIG_FILE}