#!/bin/sh
# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $
# modified by obz
# modified by lmfken, 19-Sep-93

if [ -z "$WINDOWMANAGER" ]; then
#
# WINDOWMANAGER not set, not started by "openwin"
#
	x11home=/usr/X386
	userresources=$HOME/.Xresources
	xviewresources=$HOME/.Xdefaults
	usermodmap=$HOME/.Xmodmap
	sysresources=$x11home/lib/X11/xinit/.Xresources
	sysmodmap=$x11home/lib/X11/xinit/.Xmodmap
	#
	# merge in defaults and keymaps
	#
	if [ -f $sysresources ]; then
		xrdb -merge $sysresources
	fi
	if [ -f $sysmodmap ]; then
		xmodmap $sysmodmap
	fi
	if [ -f $userresources ]; then
		xrdb -merge $userresources
	fi
	if [ -f $xviewresources ]; then
		xrdb -merge $xviewresources
	fi
	if [ -f $usermodmap ]; then
		xmodmap $usermodmap
	fi
	#
	# This is the place to select your window manager
	#
	export WINDOWMANAGER=twm
	#
	# Start your applications here
	#
	xterm &
fi

#
# Start the window manager
#
if [ ! -z "$WINDOWMANAGER" ]; then
	exec $WINDOWMANAGER >/dev/console 2>&1 
fi
twm
