#! /bin/sh # Fail on errors set -e exec_prefix="@exec_prefix@" bindir="@bindir@" libdir="@libdir@" # lspci is either in /sbin or /usr/sbin PATH=/sbin:/usr/sbin:${bindir}:${PATH} LD_LIBRARY_PATH=${libdir}:${LD_LIBRARY_PATH} export PATH LD_LIBRARY_PATH # Determine the number of video cards we have. The new render server # motherboards have the useless XGI Volari onboard video controllers (no 3D # capabilities) so we have to make sure we count only the nVidia cards. numVideo=`lspci | fgrep VGA | fgrep -i NVIDIA | wc -l` # Don't let nanoscale and the visualization servers run away. Limit cpu time # to 20 minutes. minutes=20 ulimit -t $(expr ${minutes} \* 60 ) # Make /tmp the current working dirctory. cd /tmp # Start a window manager so geovis doesn't crash #pgrep -u rappture -x twm > /dev/null || twm -display :0 & exec ${bindir}/nanoscale -x ${numVideo}