My computers is setup to take a picture whenever someone logs in and save it
using a little command-line utility called imagesnap that I call with a login
hook.
The trouble is, the point when it takes the picture is the point at which the
screen is dark, right before the desktop appears, so when the picture is take
at night, I get a black blob on a black background.
I'd like to be able to first call something that turns the screen bright white,
as that will provide plenty of illumination for the picture.
Anyone know of something that could do that as part of the login hook?
the login.sh that I call, if anyone is interested:
# cat /usr/local/bin/login.sh
#!/bin/bash
_NAME=`dscl . -read /Users/$1 RealName | tail -1`
logger -t session "** $_NAME logged in."
logger -t session "** imagesnap of $1"
DATE=`date +%m%d%y%H%M%S`
SNAP=${1}_${DATE}.jpg
TEMP=/var/snaps
FILE=${TEMP}/${SNAP}
mkdir -p $TEMP
/usr/local/bin/imagesnap ${FILE}
/usr/bin/osascript <<EOF
set myName to "$_NAME"
set MyDate to do shell script "date '+%A %B %d'"
set myTime to do shell script "date '+%H:%M'"
if myName contains "dsRecTypeStandard" then set myName to "$ALT_NAME"
do shell script "/usr/bin/logger -t login.sh \"login by :\"" & myName & "\",
myDate: \"" & MyDate
say "Hello, " & myName & ". The time is " & myTime using "Alex" speaking rate
300 volume 1
EOF
(There is another script that rysncs the pictures to my remote server)
All the googling found people who were troubleshooting a white screen at boot.
--
Maybe I should have seen it as some kind of sign, except I don't believe
in them no more; no no, but I believe these things I can't forget, tho I
don't see you anymore.
_______________________________________________
MacOSX-talk mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/macosx-talk