X11 helpers,
Howdy. I am trying to create graphs using a program called R (a
statistical program - www.r-project.org) via cron. R uses X11 libraries
to interface with the libpng and libjpeg libraries to generate graphs.
I have been able to create graphs (using cron/R) by first starting Xvfb -
the problem is that my fonts don't look right inside the graphs. Any ideas how I could
solve/troubleshoot the problem?? I run into the graph font problems on
both Solaris and Linux. I start Xvbf with the attached script.
Any help would be appreciated.
Thanks,
Tony
Tony Vargas
Cisco Systems
Engineering Computing Services
(408) 525-4113
[EMAIL PROTECTED]
#!/bin/bash
#Shell script to generate nightly tgu graphs
#Need to setup a virtual X11 frame buffer so that R can print image files. Will not
work without. In addition, this is why graph generation needs to be run as root - so
that the frame buffer can be created
TERM="vt100"
XVFB_HOME="/nfs/ecs/perf/opt/tgu_perf/XVFB"
export TERM
export XVFB_HOME
#Updated font path - so graphs look better
$XVFB_HOME/Xvfb :101 -co $XVFB_HOME/rgb -fp
/usr/openwin/lib/X11/fonts/F3bitmaps/,/usr/openwin/lib/X11/fonts/Type1/,/usr/openwin/lib/X11/fonts/Speedo/,/usr/openwin/lib/X11/fonts/misc/,/usr/openwin/lib/X11/fonts/75dpi/,/usr/openwin/lib/X11/fonts/100dpi/
-sp /usr/X/server/etc/SecurityPolicy &
export DISPLAY=localhost:101:0
AppBaseDir="/nfs/ecs/perf/opt/tgu_perf/bin"
BaseDir="/auto/solperf/tgu"
BaseRFileDir="$BaseDir/RFileBase"
BaseImageDir="$BaseDir/Images"
BaseThumbsDir="$BaseDir/Thumbs"
Month='/bin/date +"%h"'
Year='/bin/date +"%Y"'
Day='/bin/date +"%d"'
Month_Year_Combo=`/bin/date +"%h.%Y"`
#Create a directory for every month for both images, thumbnails and RFiles - if do
this, no need to do a rm every night
if [ ! -d "$BaseRFileDir/$Month_Year_Combo" ] ; then
mkdir $BaseRFileDir/$Month_Year_Combo
mkdir $BaseThumbsDir/$Month_Year_Combo
mkdir $BaseImageDir/$Month_Year_Combo
fi
#Generate R config files
$AppBaseDir/tgu_r_mon_gen
cd $BaseRFileDir/$Month_Year_Combo
for i in `ls`; do
/usr/cisco/bin/R < $i --no-save --silent
done
#####Stuff below is just junk
##$XVFB_HOME/Xvfb :101 -co $XVFB_HOME/rgb -fp
$XVFB_HOME/fonts/misc/,$XVFB_HOME/fonts/Speedo/,$XVFB_HOME/fonts/Type1/,$XVFB_HOME/fonts/75dpi/,$XVFB_HOME/fonts/100dpi/
-sp $XVFB_HOME/SecurityPolicy &
#$XVFB_HOME/Xvfb :101 -co $XVFB_HOME/rgb -fp
/usr/X/lib/X11/fonts/TrueType/,/usr/X/lib/X11/fonts/Type1/,/usr/X/lib/X11/fonts/Type3/,/usr/X/lib/X11/fonts/100dpi/,/usr/X/lib/X11/fonts/75dpi/,/usr/X/lib/X11/fonts/CSL/,/usr/X/lib/X11/fonts/misc/
-sp $XVFB_HOME/SecurityPolicy &