Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/profile1/vksingh/
Upload File :
Current File : /var/www/html/mmishra/profile1/vksingh/.xim

#!/bin/bash
#
# $Id: .xim,v 1.6 2001/10/14 18:44:58 mfabian Exp mfabian $
#
# Copyright (c) 2001 SuSE GmbH Nuernberg, Germany
#
# Mike Fabian <mfabian@suse.de>, 2000, 2001, 2002


# We start the XIM server here in ~/.xim to avoid having to do the same
# for each desktop environment separately. This script is usually sourced
# by ~/.xinitrc or ~/.xsession. The input method server will die with X.

# If you prefer to use a different XIM server, feel free to 
# edit this file :-)

# Determine the LC_CTYPE locale category setting
tmplang="en_US"
if test x$LC_ALL != x ; then
    tmplang=$LC_ALL
elif test x$LC_CTYPE != x ; then
    tmplang=$LC_CTYPE
elif test x$LANG != x ; then
    tmplang=$LANG
fi

# make sure we have all the necessary directories in the path to find
# the input servers and the tools like "pidof" which are used below
# (Ami is usually in /opt/gnome/bin!):
OLD_PATH=$PATH
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/opt/gnome/bin:/usr/lib/im/locale/ja/atokserver

case $tmplang in 
    ja*) # Japanese
        # ATOK-X?
        if type -p atokx_client > /dev/null 2>&1 \
	   && pidof /usr/lib/im/htt > /dev/null 2>&1 \
	   && pidof atokmngdaemon > /dev/null 2>&1 
	then
            export XMODIFIERS="@im=htt"
            LANG=ja_JP LC_ALL=ja_JP atokx_client &
	# WXG? 
        elif type -p kinput2 > /dev/null 2>&1 \
	     &&  pidof wxgserver > /dev/null 2>&1 
	then
            export XMODIFIERS="@im=kinput2"
            LANG=ja_JP LC_ALL=ja_JP kinput2 -xim -kinput -canna &
	# Canna?
        elif type -p kinput2 > /dev/null 2>&1 \
	     &&  pidof cannaserver > /dev/null 2>&1 
	then
            export XMODIFIERS="@im=kinput2"
            LANG=ja_JP LC_ALL=ja_JP kinput2 -xim -kinput -canna &
        # Wnn6?
	elif type -p kinput2 > /dev/null 2>&1 \
	     && pidof jserver > /dev/null 2>&1 \
	     && test -d /usr/local/OMRONWnn6
	then
	     LANG=ja_JP LC_ALL=ja_JP kinput2 -xim -kinput -wnn \
	             -wnnenvrc6 /usr/local/OMRONWnn6/wnn6linux/ja_JP/wnnenvrc &
	# FreeWnn?
        elif type -p kinput2 > /dev/null 2>&1 \
	     && pidof jserver > /dev/null 2>&1
        then
            export XMODIFIERS="@im=kinput2"
            LANG=ja_JP LC_ALL=ja_JP kinput2 -xim -kinput -wnn &
        fi
    ;;
    ko*) # Korean
        if type -p ami > /dev/null 2>&1 ; then
            export XMODIFIERS="@im=Ami"
            LANG=ko_KR LC_ALL=ko_KR ami  &
        fi
    ;;
    zh_*) # Chinese 
        case $tmplang in
	    zh_TW*)
                tmplang=zh_TW
            ;;
	    zh_CN*)
	        tmplang=zh_CN
            ;;
	esac
	if type -p xcin > /dev/null 2>&1 ; then
	    export XMODIFIERS="@im=xcin-$tmplang" 
	    LANG=$tmplang LC_ALL=$tmplang xcin &
	fi
    ;;
    *)  # all other languages
	# You may want to start an XIM server, even if you don't start
	# your X11-session in a language which usually needs an input server.
	# For example, some people may start their X11 session in English, because
	# they mostly use English, but nevertheless want to have a Japanese
	# input server running, because they also write Japanese texts.
	# If you always want to have the Japanese XIM server "kinput2" running,
	# uncomment the following two lines:
#       export XMODIFIERS="@im=kinput2"
#       LANG=ja_JP LC_ALL=ja_JP kinput2 -xim -kinput -canna &
    ;;
esac

# probably better to restore the old value of PATH...
PATH=$OLD_PATH