#!/bin/ksh # @(#)57 1.16.2.1 src/gos/2d/XTOP/programs/xinit/xinitrc.cpp, xclients, gos720 7/15/11 03:36:34 # # Licensed Materials - Property of IBM # # (C) COPYRIGHT International Business Machines Corp. 1990, 2010 # 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 #*********************************************************** # HINT: For XDM users. It would be useful for you to set # your PATH in your shell's configuration file (ie, # kshrc, or cshrc). This will allow clients started # within your XINITRC script to have the proper user # environment. Korne shell users should remember to # set ENV=$HOME/.kshrc in their .profile file. #*********************************************************** if [ "$LC_MESSAGES" = "C@lft" ] then unset LC_MESSAGES fi #*********************************************************** # start xclock then sleep 1 to make sure it can get started. #*********************************************************** xclock -geometry -0+0 -fg AntiqueWhite1 -bg grey60 -hd CadetBlue -hl AntiqueWhite1 & sleep 1 #************************************************************** # Look to see if the X property _XKB_RULES_NAMES exists. # If it does, the X server has already set the keyboard mapping. #*************************************************************** /usr/bin/X11/xprop -root | /usr/bin/grep -q "_XKB_RULES_NAMES" if [ "$?" != "0" ] then #**************************************************************** # # Set the X server's keyboard keysyms to the match the # engravings of the user's keyboard. # # - Querying odm (querykbd) to get keyboard id (e.g. En_US). # # - If querykbd returns NULL or there is no keyboard file found, # then the environment variable $LANG is used for the keymap. # # Don't remap keybaord if this is an Xstation # #***************************************************************** if [ -z "$XSTATION" ] then KBD="" XDIR=/usr/lpp/X11/defaults/xmodmap if [ -r $HOME/.Xkeyboard ] then KBD=$HOME/.Xkeyboard else KBD_LANG_LONG=`/usr/lpp/X11/bin/querykbd` KBD_LANG=`/usr/lpp/X11/bin/querykbd | cut -f1 -d'.'` if [ "$KBD_LANG" = "NULL" ] then dspmsg xinit.cat 2 'xinit: Odm keyboard id is NULL.\n' else if [ "$KBD_LANG" != "C.lft" ] 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}@alt/keyboard ] then KBD=$XDIR/${KBD_LANG}@alt/keyboard else if [ -r $XDIR/$KBD_LANG_LONG/keyboard ] then KBD=$XDIR/$KBD_LANG_LONG/keyboard else if [ -r $XDIR/$KBD_LANG/keyboard ] then KBD=$XDIR/$KBD_LANG/keyboard fi fi fi fi fi fi fi if [ "$KBD" != "" ] then xmodmap $KBD KBD_MODIFIER=`echo $KBD_LANG | awk -F'@' '{ print $2 }'` if [[ -n ${KBD_MODIFIER} ]] then export XMODIFIERS=@im=${KBD_MODIFIER} fi else if [ "$IMKEYMAPPATH" = "/usr/lib/nls/im.alt" \ -a -r $XDIR/${LANG}@alt/keyboard ] then xmodmap $XDIR/${LANG}@alt/keyboard else if [ -r $XDIR/$LANG/keyboard ] then xmodmap $XDIR/$LANG/keyboard fi fi fi fi fi #**************************************************************** # # Start the X clients. Change the following lines to # whatever command(s) you desire! # # The default clients are an analog clock (xclock), a # terminal emulator, and the Motif Window Manager (mwm). # #**************************************************************** xsetroot -solid grey60 /usr/lpp/X11/defaults/xstartterm -geometry 80x30+0-0 & exec mwm -multiscreen -xrm "ShowFeedback: -quit"