![[ Register ]](/images/navbar/register.gif)
![[ Applications ]](/images/navbar/applications.gif)
![[ Documentation ]](/images/navbar/documentation.gif)
![[ Distributions ]](/images/navbar/distributions.gif)
![[ Download Info ]](/images/navbar/download.gif)
![[ General Info ]](/images/navbar/geninfo.gif)
![[ Book Store ]](/images/navbar/bookstore.gif)

![[ Courses ]](/images/navbar/courses.gif)
![[ News ]](/images/navbar/news.gif)
![[ People ]](/images/navbar/people.gif)
![[ Hardware ]](/images/navbar/hardware.gif)
![[ Vendors ]](/images/navbar/vendors.gif)
![[ Projects ]](/images/navbar/projects.gif)
![[ Events ]](/images/navbar/events.gif)
![[ User Groups ]](/images/navbar/usergroups.gif)
![[ User Area ]](/images/navbar/user_area.gif)

![[ About Us ]](/images/navbar/aboutus.gif)
![[ Home Page ]](/images/navbar/homepage.gif)
![[ Advertise ]](/images/navbar/advertise.gif) |

| For installing Nvidia drivers for parallel use with DRI |
|---|
C.5. For installing Nvidia drivers for parallel use with DRI
#!/bin/bash
########################################################
### /usr/sbin/ruby_NVinstaller ###
### for usage call it with -h or --help parameter ###
########################################################
if [[ -z $1 ]] || [ "$1" == "-h" ] || [ "$1" == "--help" ] ;then
echo
echo "Usage :"
echo "$0 full path to Nvidia installer"
echo "eg. $0 /root/NVIDIA-Linux-x86-1.0-4349.run"
exit 1
fi
if [[ -z $OPENWINHOME ]];then
echo
echo "OPENWINHOME not defined!!!"
echo "Please set the environment variable OPENWINHOME"
echo "pointing to your XFree prefix eg. /usr/X11R6"
echo "for bash shell :"
echo "export OPENWINHOME=/usr/X11R6"
exit 1
fi
cd $OPENWINHOME
echo
echo "backup file for XFree's GL libraries "
echo "is $OPENWINHOME/libGL-backup.tar"
if [ -x libGL-backup.tar ]; then
echo "old backup exist, deleting" && rm libGL-backup.tar
fi
echo
find lib -name "libGL.*" -o -name "libGLcore*" \
-o -name "libglx.*" | xargs tar rpf libGL-backup.tar \
&& echo "backup finished"
echo
echo "now running Nvidia installer"
echo "`which $1` --no-opengl-headers --xfree86-prefix=/usr/X11R6NV --opengl-prefix=/usr/X11R6NV"
echo
`which $1` --no-opengl-headers --xfree86-prefix=/usr/X11R6NV --opengl-prefix=/usr/X11R6NV
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo
echo "Nvidia installer finished,"
echo "now coping files to /usr/X11R6/libNV/"
echo
cd /usr/X11R6NV/lib && tar c * | tar xvC /usr/X11R6/libNV/
echo
echo "restoring backuped GL libraries"
echo
cd $OPENWINHOME
tar xvfp libGL-backup.tar && ldconfig && echo "GL libraries restored" && rm libGL-backup.tar
fi
if [ $RETVAL -ne 0 ]; then
echo
echo "installer aborted, not restoring backup"
echo "deleting backup files" && rm libGL-backup.tar
fi
echo
echo "script finished"
|
|
 |
|