File etc-x11-xim.d-kinput2-canna of Package kinput2

OLD_PATH=$PATH
PATH=/usr/bin:/usr/X11R6/bin/:$PATH

if ! type -p kinput2 > /dev/null 2>&1 ; then
    echo "kinput2 is not available."
    return 1
fi
if ! pidof cannaserver > /dev/null 2>&1 ; then
    echo "cannaserver is not running."
    return 1
fi

export XMODIFIERS="@im=kinput2"
export GTK_IM_MODULE=xim
export QT_IM_SWITCHER=imsw-multi
export QT_IM_MODULE=xim

kinput2 -xim -kinput -canna -cannaserver unix &

PATH=$OLD_PATH

# success:
return 0