#!/bin/sh
# Copyright (C) 1999 - 2004 Red Hat, Inc. All rights reserved. This
# copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the
# GNU General Public License version 2.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

sysresources=/etc/X11/Xresources

# merge in defaults
if [ -f "$sysresources" ]; then
    xrdb -merge "$sysresources"
fi

#/usr/X11R6/bin/xsetroot -solid "#222E45"

if [ -z "$RUNNING_UNDER_GDM" ] ; then
  /sbin/pidof -s kdm &> /dev/null && [ $? -eq 0 -a -x /usr/bin/kdmdesktop ] && /usr/bin/kdmdesktop && sleep 1s

  # only set the background if the xsri program is installed
  if [ -x /usr/bin/xsri -a -r /etc/X11/xsrirc ]; then
      /usr/bin/xsri --redhat-login --set
  fi
fi
