A lot of our users complain about slow machines and have cluttered desktops, generally full of screen shots. I composed the following to send all screenshots to a separate folder and redirect the screen capture app for future screenshots taken.
The script is:
"#!/bin/bash
mkdir -p /temp1
touch /temp1/log.log
whoami >> /temp1/log.log
ls -l /dev/console >> /temp1/log.log
echo $3 >> /temp1/log.log
CUSER=$3
CUHOME="/Users/$3"
echo "CUSER is $CUSER and CUHOME is $CUHOME" >> /temp1/log.log
mkdir -p $CUHOME/Screenshots
sleep 1
sudo chown -R $CUSER $CUHOME/Screenshots
mv -f $CUHOME/Desktop/Screen* $CUHOME/Screenshots/
touch $CUHOME/.screen.sh
echo "#!/bin/sh" > $CUHOME/.screen.sh
sudo -s -u $CUSER defaults write com.apple.screencapture location $CUHOME/Screenshots
killall SystemUIServer
exit 0"
Does anyone think this is helpful?
