Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Capture laptop screenshots to remote devices Laptop Macs
The Effect:

You press a few keys on your Blackberry, and you receive an emailed an image of whoever is in front of your laptop. The image is also saved and the filename time stamped. This is a complete hack and there are probably a million ways to do this better, but it works.

What you need:
  • iSightCapture
  • A custom-made Automator workflow
  • A Blackberry with data services (I have a T-Mobile Pearl)
  • A free program called midpSSH installed on your Blackberry
I won't cover these things in this hint: Installing midpSSH on your Blackberry, setting up a static address to connect to (search Google for no-IP for mac), beginner information on using Terminal and Automator. Read on for the solution...

First, download iSightCapture and put it in /usr/bin. Then start a new Automator workflow, and make it look like this:
  1. Automator: Run Shell Script -- (240x260 is my Pearl's screen resolution). The script: isightcapture -h 240 -w 260 /Users/you/Documents/shots/snappit.jpg
  2. Finder: Get Specified Finder Items [ignore results from previous action] -- add /Users/you/Documents/shots/snappit.jpg
  3. Mail: New Mail Message -- enter your Blackberry's email address in the To: field, give it a subject and a message if you so desire, and select your account (note you must have already set up some email address using the program Mail)
  4. Mail: Send Outgoing Messages
  5. Automator: Run AppleScript [ignore results from previous action] -- This script hides Mail:
    tell application "System Events"
    tell application "Mail" to activate
    tell process "Mail"
    keystroke "h" using command down
    end tell
    end tell
  6. Automator: Run Shell Script [ignore results from previous action]:
    cp /Users/you/Documents/shots/snappit.jpg 
    /Users/YOURUSERNAME/Documents/shots/snappit`date +%y%m%d%H%M%S`.jpg
Save the workflow and place it somewhere (remember where you save it). The command to execute an Automator script in the shell is: automator /path/to/automator.workflow/, and it takes no attributes. Test your workflow using Terminal. Set up your laptop with no-ip or some other dynamic DNS helper ( Connect to your computer via midpSSH on your phone, login, and execute the workflow. Obviously, you'll want to enable remote login via ssh in the Sharing tab of System Preferences first.

I also then put in an Automator pause for 20 seconds, and then the shell script killall Mail, because i dont use Mail for anything but this. The last thing to note is that midpSSH supports some macros, making it fairly easy to execute this command. (Please note this is my first-ever Mac, and I'm sure the script could be improved.)
  • Currently 2.80 / 5
  You rated: 2 / 5 (5 votes cast)

10.4: Capture laptop screenshots to remote devices | 3 comments | Create New Account
Click here to return to the '10.4: Capture laptop screenshots to remote devices' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Capture laptop screenshots to remote devices
Authored by: mubarak on Mar 05, '07 09:19:47AM

You could probably do this easier with just the command line if you used "mail" rather than "Mail". Try "man mail" or "man pine" to find out about your favorite command line e-mail program. (You may need to install pine.)

[ Reply to This | # ]
10.4: Capture laptop screenshots to remote devices
Authored by: mankoff on Mar 05, '07 03:01:46PM

I'm not aware that pine will let you send from the CLI. Can you do this? I was forced to use mutt.


[ Reply to This | # ]
Cat skinning
Authored by: darndog on Mar 05, '07 12:10:34PM
Alternative capture and mailer script for those that don't want to start and stop Apple Mail for just this one occasion:

showme.scpt (save in ~/Library/Scripts/):
do shell script "isightcapture -h 240 -w 260 ~/Documents/shots/snappit.jpg ; uuencode ~/Documents/shots/snappit.jpg snappit.jpg | mail -s CamPic ; mv ~/Documents/shots/snappit.jpg ~/Documents/shots/`date +%y%m%d%H%M%S`.jpg"

Alternative trigger for Apple Mail users who would rather wait 5mins than enable ssh to the world:

new mail rule:
If (any) of the following conditions are met:
(subject) (is equal to) [ShowMeThePic]

Perform the following actions:
(Run AppleScript) [~/Library/Scripts/showme.scpt]

To activate, send your desktop an email with the subject "ShowMeThePic" (you may want to change that to something else) you'll also need to edit '' to the correct address. If your phone mail client can't handle uuencoded images you can use 'mutt' or similar to mime encode and send the pic.

Just thought I'd throw these out there, would make more sense to intergrate the Authors Automator script into the Apple Mail trigger if you're a Apple Mail user, I think quite a few mail clients have 'run applescript' as a rule action as well. Alternatively Triggers are pretty easy to set up through scriptable irc clients or the built in webserver, personally I've never been comfortable with enabling ssh to the internet, if you do decide to do that ensure you have a seriously good password for your user account. dD

[ Reply to This | # ]