#!/bin/sh # Author: Steven Shiau <steven _at_ nchc org tw> # License: GPL # check if root or not if [ ! "$UID" = "0" ]; then echo "[$LOGNAME] You need to run this script \"`basename $0`\" as root." exit 1 fi # For FC3 - iiim, for FC2 - IIim echo "Try to stop iiim service if necessary..." [ -x /etc/init.d/iiim ] && /etc/init.d/iiim stop chkconfig iiim off 2>/dev/null [ -x /etc/init.d/IIim ] && /etc/init.d/IIim stop chkconfig IIim off 2>/dev/null echo "done!" # backup xcin and set gcin echo -n "Backup the original xinput-zh_TW as xinput-zh_TW.drblsave..." [ -f /etc/alternatives/xinput-zh_TW ] && mv /etc/alternatives/xinput-zh_TW /etc/alternatives/xinput-zh_TW.drblsave echo "done!" echo -n "Setting the system to use gcin..." cat <<-EOF > /etc/alternatives/xinput-zh_TW XIM=gcin XIM_PROGRAM=gcin XIM_ARGS="-x gcin" GTK_IM_MODULE=gcin EOF echo "done!" echo "You have to restart X-window to make gcin effect!"