#!/bin/ksh
# @(#)58        1.15.1.1  R2/XTOP/aixclients/xinit/xinitrc, 9102.0, gos312 11/20/90 14:22:44
#
# COMPONENT_NAME: X11rte
#
# FUNCTIONS: .xinitrc
#
# ORIGINS: 27
#
# (C) COPYRIGHT International Business Machines Corp. 1990
# All Rights Reserved
#
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#

# This script is invoked by /usr/lpp/X11/bin/xinit

#****************************************************************
#                                                               *
#     Set the X server's keyboard keysyms to the match the      *
#     engravings of the user's keyboard.                        *
#                                                               *
#****************************************************************

KBD=""
XDIR=/usr/lpp/X11/defaults/xmodmap

if [ -r $HOME/.Xkeyboard ]
then
    KBD=$HOME/.Xkeyboard
else
    if [ "$LANG" = "ibmsbcs" ]
    then
        KBD_LANG=$LANG
    else
        KBD_LANG=`echo "$LANG" | cut -c1-5`
    fi
    if [ "$KBD_LANG" != "En_US" ]
    then
        if [ -r $IMKEYMAPPATH/$KBD_LANG/keyboard ]
        then
             KBD=$IMKEYMAPPATH/$KBD_LANG/keyboard
        else
            if [ "$IMKEYMAPPATH" = "/usr/lib/nls/im.alt"        \
                -a -r $XDIR/$KBD_LANG/keyboard.alt ]
            then
                KBD=$XDIR/$KBD_LANG/keyboard.alt
            else
                if [ -r $XDIR/$KBD_LANG/keyboard ]
                then
                    KBD=$XDIR/$KBD_LANG/keyboard
                fi
            fi
        fi
    fi
fi
if [ "$KBD" != "" ]
then
    xmodmap $KBD
fi


#****************************************************************
#                                                               *
#  Start the X clients.  Change the following lines to          *
#  whatever command(s) you desire!                              *
#                                                               *
#  The default clients are an analog clock (xclock), an hft     *
#  terminal emulator (aixterm), the X Desktop Manager (xdt),    *
#  and the Motif Window Manager (mwm).                          *
#                                                               *
#****************************************************************

xsetroot -bitmap ~/bin/stealie.bm -fg black -bg skyblue
# xsetroot -solid black
# xbiff -geometry 80x50-165+0 -bg MediumAquamarine &
xclock &
aixterm -n 'darkstar crashes...' -vb -geometry 90x25+0+0 -fg LightGrey -bg DarkOliveGreen &
aixterm -n 'darkstar crashes...' -vb -geometry 90x36+424+524 -fg Cyan -bg MidnightBlue &
aixterm -n 'darkstar crashes...' -vb -geometry 90x30+0-0 -fg black -bg MediumAquamarine &
# xant ralvm29 -ext

# Allow xserver access to a few remote hosts
xhost +malmborg
xhost +frankenstein
xhost +jumbo
