Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/indem/mailscript/mcell/
Upload File :
Current File : /var/www/html/mmishra/indem/mailscript/mcell/.xim.template

#!/bin/bash
#
# $Id: xim,v 1.4 2003/08/06 11:02:39 mfabian Exp $
#
# 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=${LC_ALL-${LC_CTYPE-${LANG-en_US}}}

# 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"
            kinput2 -xim -kinput -canna &
	# Canna?
        elif type -p kinput2 > /dev/null 2>&1 \
	     &&  pidof cannaserver > /dev/null 2>&1 
	then
            export XMODIFIERS="@im=kinput2"
            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
	    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"
            kinput2 -xim -kinput -wnn &
        fi
    ;;
    ko*) # Korean
        if type -p ami > /dev/null 2>&1 ; then
            export XMODIFIERS="@im=Ami"
            case $WINDOWMANAGER in
                *kde|*windowmaker|*wmaker)
                    ami -wm -wait &
                ;;
                *)
                    ami &
                ;;
            esac
        fi
    ;;
    zh_HK*) # Traditional Chinese for Hongkong
	if type -p xcin > /dev/null 2>&1 ; then
	    export XMODIFIERS="@im=xcin-zh_HK" 
	    LANG=zh_HK LC_ALL=zh_HK xcin &
	fi
    ;;    
    zh_TW*) # Traditional Chinese 
        if type -p xcin > /dev/null 2>&1 ; then
            export XMODIFIERS="@im=xcin-zh_TW" 
            LANG=zh_TW LC_ALL=zh_TW xcin &
        fi
    ;;
    zh_CN*) # Simplified Chinese 
        if type -p scim > /dev/null 2>&1 ; then
            export XMODIFIERS="@im=SCIM" 
            scim -d
        elif type -p xcin > /dev/null 2>&1 ; then
            export XMODIFIERS="@im=xcin-zh_CN" 
            LANG=zh_CN LC_ALL=zh_CN xcin &
        fi
    ;;
    *)  # all other languages:
    
	# probably an XIM server is not needed.
	# Nevertheless it may be useful to set XMODIFIER="@im=local"
	# because "@im=local" means "use compose and dead-keys" and
	# some programs will use compose and dead-keys only if XMODIFIERS
	# is set to either "@im=local" or "@im=none".
	
        export XMODIFIERS="@im=local"
	
	# 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"
#       kinput2 -xim -kinput -canna &

    ;;
esac

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