#!/bin/sh
#
# $HOME/.xinitrc	
#
#	$Revision: 1.1 $
#	$Date: 1998/04/02 10:09:27 $
#

if [ -x /usr/bin/arch ]; then
	machine=`uname -r`
fi
 
case $machine in
    4.1.* )
	XDIR="/usr/local/X11R5";;
    * )
        XDIR="/usr/local/X11R6";;
esac


SYSDIR=${XDIR}/lib/X11/xinit
sysresources=${SYSDIR}/.Xresources
sysmodmap=${SYSDIR}/.Xmodmap

userresources=${HOME}/.Xresources
usermodmap=${HOME}/.Xmodmap

# merge in defaults and keymaps

if [ -f $userresources ]; then
    xrdb -merge $userresources
elif [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $usermodmap ]; then
    xmodmap $usermodmap
elif [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

# set the fonts path
 
FONTLIST=" \
    ${XDIR}/lib/X11/fonts/ETL \
    ${XDIR}/lib/X11/fonts/Indian \
    ${XDIR}/lib/X11/fonts/Chinese \
    ${XDIR}/lib/X11/fonts/Japanese \
    ${XDIR}/lib/X11/fonts/Korean \
"
# russian fonts path
#
#    ${XDIR}/lib/X11/fonts/xrus-1251
#    ${XDIR}/lib/X11/fonts/cyrillic/misc
#    ${XDIR}/lib/X11/fonts/cyrillic/100dpi
#    ${XDIR}/lib/X11/fonts/cyrillic/75dpi

for fontdir in `echo $FONTLIST`
do
    if [ -f $fontdir/fonts.dir ]; then
        xset fp+ $fontdir
    fi
done

sleep 1

xset b on &
xset b 1 30 1 &

mwm &

sleep 1
xclock -geometry 55x55-0+0 -bg lightyellow &
xyoubin -geometry 72x48-2+90 &

xsetroot -solid gray40

kterm -geometry 80x24-0-110 \
   -T 'kterm' -name 'kterm'  -bg lightblue \
   -km euc -sb \
   -xrm ".kterm.iconPixmap:${XDIR}/include/X11/bitmaps/terminal" \
   -fr r24 \
   -fn 12x24 -fk kanji24 &

exec kterm -geometry 50x4-0-0 \
   -T "Login@`hostname`" -name 'Login' -bg lightpink -km euc -sb \
   -xrm ".Login.iconPixmap:${XDIR}/include/X11/bitmaps/xlogo32" \
   -C
