## A sample, slightly enhanced .olinitrc file, allows
## login time selection of window manager, and also 
## shows how to insert some sample clients

                                    # Installed by els.4.2 package instance
XWINHOME=/usr/X export XWINHOME     # Installed by els.4.2 package instance
export XKEYBOARD                    # Installed by els.4.2 package instance
XNLSPATH=$XWINHOME/lib/nls/elsXsi/$XKEYBOARD   # Installed by els.4.2 package instance
XMODIFIERS=@im=Local                # Installed by els.4.2 package instance
NUMLOCK=no                          # Installed by els.4.2 package instance
export XNLSPATH XMODIFIERS NUMLOCK  # Installed by els.4.2 package instance
                                    # Installed by els.4.2 package instance
#ident "@(#)/usr/X/adm/.olinitrc.sl 1.1 1.0 10/31/92 37130 Univel"
#ident "$Header:$"

#ident	"dtadmin:userad/scripts/.olinitrc	1.3"
#	Copyright (c) 1990, 1991, 1992 UNIX System Laboratories, Inc.
#	Copyright (c) 1988, 1989, 1990 AT&T
#	  All Rights Reserved

#	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF
#	UNIX System Laboratories, Inc.
#	The copyright notice above does not evidence any
#	actual or intended publication of such source code.

#
# Minimize contention at startup:  In this olinitrc file, DO NOT start
# olwm or dsdm in the background.  This way, initialization code for the
# two applications (as well as dtm) is run sequentially.
#
# FOR ALL OTHER MODULES (e.g. mwm&), YOU MUST START THEM IN THE BACKGROUND (&)!
#

copyright.sh &
#olwm   #default

# comment out olwm above and then add this to switch window
manager based on argument to login
case ${L0} in
 fvwm*) /usr/X/bin/fvwm& ;;
 ctwm*) /opt/bin/ctwm& ;;
 mwm*) mwm& ;;
 *) olwm ;;
esac

dsdm # default

#Some sample clients uncomment to run
#faces -geometry 95x8x150+0 -p 20&
#xtachos&
#xterm -geometry 95x8+0+121 -fn 6x10 -T "Mail Log" -sb -sl 150 -n "Mail Log" -e rsh usg tail -f /usr/mail/:log &

#
#  Startup everything in the user's Startup_Items folder
#  Make sure something is there first
#

if [ -f $HOME/Preferences/Startup_Items/* ]
then
	for i in $HOME/Preferences/Startup_Items/*
	do
		(sleep 15; exec $i) &
	done
fi

#
#  Pick a gif in the user's Backdrop_Items folder and set the root with it
#  Be random about it if more than one exists.
#

if [ -f $HOME/Preferences/Backdrop_Library/Backdrop_Items/* ];
then
	x=`date +%S`
	x=`expr substr $x 2 1`
	y=0
	for i in `ls $HOME/Preferences/Backdrop_Library/Backdrop_Items `
	do
		y=`expr $y + 1`
	done
	x=`expr $x + $y`
	x=`expr $x % $y`
	y=0
	for i in `ls $HOME/Preferences/Backdrop_Library/Backdrop_Items `
	do
		if [ $x -eq $y ]
		then
			if [ -f /usr/X/bin/xloadimage ];
			then
				/usr/X/bin/xloadimage -onroot -quiet -colors 200 $HOME/Preferences/Backdrop_Library/Backdrop_Items/$i &
			fi
		fi
		y=`expr $y + 1`
	done
fi


