echo Now installing MODELS@HOME for Linux SuSE 8

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

if [ ! -e /etc/X11/xdm/Xsetup.backup ]; then
  echo Storing backup of /etc/X11/xdm/Xsetup as Xsetup.backup
  mv /etc/X11/xdm/Xsetup /etc/X11/xdm/Xsetup.backup
fi
echo Installing new Xsetup
cp Xsetup_SU8 /etc/X11/xdm/Xsetup

if [ ! -e /etc/X11/xdm/Xsession.backup ]; then
  echo Storing backup of /etc/X11/xdm/Xsession as Xsession.backup
  mv /etc/X11/xdm/Xsession /etc/X11/xdm/Xsession.backup
fi
echo Installing new Xsession
cp Xsession_SU8 /etc/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_SU8 /usr/lib/X11/app-defaults/XScreenSaver

if [ -e /etc/init.d/rc5.d/S11xdm ]; then
  echo Adding xdm as a respawned application to inittab
  mv /etc/init.d/rc5.d/S11xdm /etc/init.d/rc5.d/inittab_S11xdm
  echo x:5:respawn:/etc/init.d/rc5.d/inittab_S11xdm start >tmp.txt
  cat /etc/inittab tmp.txt >inittab.new
  mv /etc/inittab /etc/inittab.backup
  mv inittab.new /etc/inittab
fi

echo Installing xsri
cp xsri /usr/bin/xsri

echo Finished






