echo Now installing MODELS@HOME for Linux on RedHat 7 and KDM

echo Copying libraries to /usr/lib
chmod 755 libSDL*
cp libSDL* /usr/lib/.

if [ ! -e /usr/lib/X11/xdm/Xsetup_0.backup ]; then
  echo Storing backup of /usr/lib/X11/xdm/Xsetup_0 as Xsetup_0.backup
  mv /usr/lib/X11/xdm/Xsetup_0 /usr/lib/X11/xdm/Xsetup_0.backup
fi
echo Installing new Xsetup_0
cp Xsetup_0_RH7 /usr/lib/X11/xdm/Xsetup_0

if [ ! -e /usr/lib/X11/xdm/Xsession.backup ]; then
  echo Storing backup of /usr/lib/X11/xdm/Xsession as Xsession.backup
  mv /usr/lib/X11/xdm/Xsession /usr/lib/X11/xdm/Xsession.backup
fi
echo Installing new Xsession
cp Xsession_RH7 /usr/lib/X11/xdm/Xsession

if [ ! -e /usr/lib/X11/app-defaults/XScreenSaver.backup ]; then
  echo Storing backup of /usr/lib/X11/app-defaults/XScreenSaver as XScreenSaver.backup
  mv /usr/lib/X11/app-defaults/XScreenSaver /usr/lib/X11/app-defaults/XScreenSaver.backup
fi
echo Installing new XScreenSaver configuration file
cp XScreenSaver_RH7 /usr/lib/X11/app-defaults/XScreenSaver

if [ ! -e /etc/X11/prefdm ]; then
  echo Storing backup of /etc/X11/prefdm as prefdm.backup
  mv /etc/X11/prefdm /etc/X11/prefdm.backup
fi
echo Installing new prefdm file
cp prefdm_RH7 /etc/X11/prefdm

echo Finished






