How to Open Websites on Your Mac From Your iPhone Using Dropbox, a Sendtodropbox.com Account, and Folder Actions

Hardware:

  • any iOS device (iPod Touch, iPhone, or iPad)
  • an Apple Computer running OS X
Software:
  • iOS
  • Mac OS 10.6+ (but I’m running 10.8)
Sometimes I find a website that doesn’t view well on my iPhone and I want to look at it on my Mac or I want to make sure to look at a website when I get back to my computer.  Apple has made that semi-easy because you can “Mail Link to this Page” from within Safari.  My deal is that I don’t want to have to email the link and then go to my Mac, open the email, and then click on the link.  I want it to open automatically.  You can set this up on your Mac using a free Sendtodropbox.com account, a service that allows you to send emails (with or without attachments) and have the email and the attachment be added to your dropbox account.  I learned how to do this off another website a long time ago and I can’t find it anymore so I figured I’d preserve it while I remember how to do it.
Step 1:  Download and Install Dropbox and Create a free Dropbox.com account.  I’m not going to detail that but if you go to www.dropbox.com it’s real easy.  Install Dropbox.
Step 2: Set up a free Sendtodropbox.com account.  Visit www.sendtodropbox.com and sign up.

Signing up for a send to dropbox account will also involve giving “Send to Dropbox” permission to connect to your Dropbox Account:

Clicking “Allow” will create an “attachments” folder inside the “Dropbox” folder on your mac.  While you have it, add the sendtodropbox.com custom (secret) email address they give you to your iPhone address book and name it “Send to Dropbox” so you can remember it.
Step 3: Run Automator.  You can do this by clicking on the magnifier icon in the top right of your screen and type automator.  It will show up at the top of the list.  You can hit enter or click on it in the list.
Step 4: Pick “Folder Action” from the “Choose a type for your document:”  If you open up Automator and this menu doesn’t come up it is because you have already created a workflow (and that last workflow will open up by default).  Simply select “New” from the File menu or press Command-N.
Step 5: Add a “Run Shell Script” to your workflow.  Type “run shell script in the search box at the top of the left column. Click and drag “Run Shell Script” to the right Workflow window.
Step 6: Set the “Shell:” setting.  Pick “/usr/bin/ruby” from the “Shell:” drop-down menu at the top left of the “Run Shell Script” action:
Step 7: Set the “Pass input:” setting.  Pick “to stdin” from the “Pass input:” drop-down menu. (IMPORTANT NOTE: When I set up this on my latest install of Mavericks I needed to pick pass input as “Arguments” before it would work 4/3/2014.)
Step 8: Edit the code.  Replace the code with the following:
ARGV.each do |f|
file = File.new(f, “r”)
while (line = file.gets.chomp)
system “open #{line}”
end
file.close
end
NOTE: You may have to scroll down (or expand the window size) to see all the code that is automatically inserted when you select “/usr/bin/ruby”.
Step 9: Select the “attachments” folder inside your Dropbox folder.  Click on the “Folder Action receives files and folders added to” drop-down menu.
Scroll down to the “Dropbox” folder in the Sidebar (left column) and click on it once.  Select “attachments” in the main window and click the “Choose” button.  If you don’t have an attachments folder you may not have been connected to the internet since you activated your Sendtodropbox account OR you may need to send a test email to your Sendtodropbox account for it to be created.  I can’t remember at what point my first one was created.
Step 10: Save the workflow.  Either press Command-S or select “Save…” from the File menu.  Name it anything you want but I’d name it something that helps you remember what it does.
Step 11:  Open Safari on your iPhone (or any iOS device) and browse to a webpage you want to open on your Mac (or a test site for now).  I’m not going to try to explain how this happened to be the web page I was on when I decided to take this screenshot but it was too funny not to use:
Step 12:  Tap on the Arrow pointing out of the box at the bottom middle of the screen and you’ll get this menu:
Step 13: Select “Mail Link to this Page.”  Enter your “Send to Dropbox” custom (secret) email address.
Send the email and then go back to your Mac.  Once the Dropbox app on your Mac detects there is a new file in your folder on their server it will synchronize to your Mac:

This is what the text file (.txt) looks like:

Note: this script works just fine with a signature on the email of your iOS device.

The folder action will then launch your default web browser with the web link in the email:

Note that I’m running Hiss which routes Growl notifications through the Mac’s new notification center (top right).Other Reference:

Amazon Associate Disclosure: As an Amazon Associate I earn from qualifying purchases. This means if you click on an affiliate link and purchase the item, I will receive an affiliate commission. The price of the item is the same whether it is an affiliate link or not. Regardless, I only recommend products or services I believe will add value to Share Your Repair readers. By using the affiliate links, you are helping support Share Your Repair, and I genuinely appreciate your support.

Written By
More from John Mueller
How to Block Ads on Websites
I’ve written a handful of tutorials on how to install software on...
Read More

Leave a Reply

Your email address will not be published. Required fields are marked *