#!/bin/sh
# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/usr/X11R6/lib/X11/xinit/Xresources
sysmodmap=/usr/X11R6/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 $usermodmap ]; then
    xmodmap $usermodmap
fi

if [ -x $HOME/.xinitrc ]; then
	exec $HOME/.xinitrc
fi

# start some nice programs
xsetroot -solid Red
#xsetroot -solid Aquamarine4
#xterm &

if [ -x "$X_WINDOW_MANAGER" ] ; then
    exec $X_WINDOW_MANAGER
elif [ -x /usr/bin/matchbox ] ; then
    exec /usr/bin/matchbox
elif [ -x /usr/X11R6/bin/twm ] ; then
    exec /usr/X11R6/bin/twm
else
    echo "No window manager found" 1>&2
fi
