|
I'm running 10.4.11 and I haven't had any real problem running isightcapture from the console or remotely (via ssh). I have a little script that takes a pic every few seconds. I have it start when the computer boots. It does sometimes stick and give the error you mention but it appears to stem from a problem with running isightcapture while isightcapture is still running from another task.
#!/bin/bash
# Michael McGlothlin <michaelm@plumbersstock.com>
rest () {
LOAD=`uptime | cut -d ":" -f4 | cut -d " " -f2 | tr -d "."`
if [[ $LOAD -gt "300" ]] ; then
sleep 30
elif [[ $LOAD -gt "150" ]] ; then
sleep 15
elif [[ $LOAD -gt "100" ]] ; then
sleep 10
elif [[ $LOAD -gt "50" ]] ; then
sleep 5
else
sleep 3
fi
}
do_capture () {
CAPTURE="isightcapture -t jpg"
cd $HOME/captures
while /usr/bin/true ; do
D1=`date +%y%m%d/%H`
D2=`date +%y%m%d.%H%M%S`
if [ ! -d $D1 ] ; then
mkdir -p $D1
fi
FN="$D1/$D2.jpg"
$CAPTURE $FN
if [ -h 'last.jpg' ] ; then
rm last.jpg
fi
ln -s $FN last.jpg
rest
done
}
if [[ $EUID == "0" ]] ; then
su - $1 -c "$0"
else
renice 19 $$
do_capture &
fi |