#!/bin/sh
#----------------------------------------#
# set background for sax configuration   #
#----------------------------------------#

#-----------------#
# Getting Display #
#-----------------#
if [ -z "$DISPLAY" ]; then
 export DISPLAY=:0
 DISP=:0
else
 DISP=`echo $DISPLAY | cut -f2 -d: | cut -c1`
 DISP=`expr $DISP + 1`
fi
export DISPLAY=:$DISP

#--------------#
# path names   #
#--------------#
SERVER=$1
BACK=/var/X11R6/sax/pixmaps/setup.xpm
BACK_DARK=/var/X11R6/sax/pixmaps/dark.xpm

#----------------------------------#
# set background and mouse cursor  #
#----------------------------------#
echo $SERVER | grep -iE *VGA16* > /dev/null
if [ $? = "0" ]; then
 xpmroot $BACK_DARK &
else
 xpmroot $BACK &
fi
xsetroot -cursor_name top_left_arrow &

