PATH=/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/canna/bin:/.Windows/winsys32
cd

exec > .xinitrc.log 2> .xinitrc.log

#DISPLAY=`hostname`:0.0
DISPLAY="localhost:0.0"
export DISPLAY
xhost oyabun-gw

rm -rf /tmp/.iroha_unix /tmp/.ki2-unix

/usr/local/canna/bin/cannaserver

LANG=ja_JP.EUC
XMODIFIERS='@im=kinput2'
export LANG XMODIFIERS

if [ -d /usr/X11R6/lib/X11/fonts/TT ]; then
    xset fp+ /usr/X11R6/lib/X11/fonts/TT
fi

xmodmap $HOME/.xmodmap.jp

xrdb -load $HOME/.Xresources

kinput2 -canna &

xterm -geometry 80x5 -title 'xterm' -e /bin/tcsh &
kterm -geometry 80x42+0+100 -title 'kterm' -km sjis -sb -sl 1000 -e /bin/tcsh &
kterm -geometry 80x25+500+300 -title 'kterm' -km sjis -sb -sl 1000 -e /bin/tcsh &
xeyes -geometry +864+0 &
xclock -geometry +850+130 &
#
#/usr/local/bin/xwinclip &
openbox

cannakill
# if cannakill could not terminate cannaserver...
p=`ps a | grep cannaserver | awk '{ print $1; }'`
if [ "$p" != "" ]; then
    kill $p
fi
rm -rf /tmp/.iroha_unix /tmp/.ki2-unix
