Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am a work-from-home developer that gets paid by the hour.

I am seeking an app that runs in the background and records my screen(s) and uploads it (every 20 seconds or so) through FTP to my webserver.

That way, I can set up a simple website for my clients, and they can "watch me work" and be assured that I am really working for them, and not just goofing around or playing games.

It will have to be a ambient app, meaning that it should be very discreete and not interfere in my work (xcode/unity stuff mainly)

Im willing to pay a fair shareware fee, but not anything subscription-based.

share|improve this question
1  
I've generally solved or prevented this kind of trust issue by working at their site at the beginning of a job, and a few days in, promising a piece of work that I'll do in my own office and deliver on [specified day]. Then I show up on that day with it done. They usually relieved to find out they don't need to baby-sit me and they seldom care where or when I work after that. –  JRobert Jul 24 '11 at 14:25

2 Answers 2

up vote 3 down vote accepted

You could use Automator to build a workflow to do this. Automator can take screenshots and you need to use a shell script to upload the screenshot unless you have an FTP client which is compatible with Automator. Bear in mind that uploading a screenshot might take longer than 20 seconds depending on screen size and your internet connection speed. A 5-minute interval might be more appropriate.

Here is an Automator workflow which I just tested successfully to take a screenshot and upload it to an ftp server.

NB: you need to set the shell script step to ignore input from the previous step or it will fail when trying to convert the image to text. Automator Workflow You can save this workflow as a .workflow file and then you need to schedule it to run on whatever interval you think is appropriate. You could do this through iCal but I think iCal would only allow you to run it daily or less frequently. So you need something else. You could do it by writing a launchd script or you could use a utility like lingon to create the script for you. This way you could set it to run on whatever interval you like.

share|improve this answer
1  
Great chaining of tools - just be sure to unload the launchd job before sleeping. Launchd will detect jobs that should have run and could perhaps schedule a few more snaps than you want. A quick test to track the last pass and this pass would prevent dumping stale or too many snaps if launchd schedules them too rapidly. –  bmike Jul 24 '11 at 16:04
    
Wow, this was right on the money. I will try making a script with this right away. +1 and approved. –  Nils Munch Jul 24 '11 at 19:28
    
Hope it works for you then, the only hurdle is getting it to run every x seconds/minutes so if you find launchd a bit complex then that app 'lingon' might make it simpler –  conorgriffin Jul 24 '11 at 19:38

/3/ftp_screenshots.sh:

#!/bin/sh

tmp=${TMPDIR}`uuidgen`.png
screencapture $tmp
fn=`date '+%m-%d-%H-%M'`.png
ftp -in ftp.server.tld<<FTP
user username pa55word
binary
cd www
put $tmp $fn
bye
FTP
rm $tmp

I'd prefer SSH (ssh - Upload file with SCP bash script - Stack Overflow), but I still haven't figured out how to set up SSH keys.


~/Library/Preferences/ftp_screenshots.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Disabled</key>
    <false/>
    <key>Label</key>
    <string>ftp_screenshots</string>
    <key>ProgramArguments</key>
    <array>
        <string>sh</string>
        <string>/3/ftp_screenshots.sh</string>
    </array>
    <key>StartInterval</key>
    <integer>1800</integer>
    <key>RunAtLoad</key>
    <true/>
    <key>ExitTimeOut</key>
    <integer>60</integer>
</dict>
</plist>

These functions could be helpful:

laload() { launchctl load ~/Library/LaunchAgents/"$1".plist; }
launload() { launchctl unload ~/Library/LaunchAgents/"$1".plist; }
share|improve this answer
    
Cool! +1 for you –  conorgriffin Jul 26 '11 at 23:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.