Monday, April 7, 2014

Stopping Adobe flash upgrade from launching a browser tab has interesting side effect - Can no longer click on links in emails

After updating adobe recently, I was annoyed when it launched a browser tab to inform me that, yes, the update had succeeded. Of course, programs use this tactic these days to get around the common habit of otherwise blocking this renegade attempts to "phone home". But... it's quite problematic to stop a program launching a tab in your browser.
So after some web searching and seeing a few tales from others trying to achieve the same thing, I was eventually drawn to a comment by a user who said;
You're making it too complicated - just set the default browser to a browser you don't use and block that.
Interesting angle, but still problematic if you don't have sufficient firewall control. On my mac, I could turn on the built-in firewall, but that's really only about blocking inbound connections. I've used ipfw before, and it's great for what it does, but it doesn't do application specific blocks the way that most firewall applications on Windows can. And I didn't want to foray into the world of custom firewalls for mac - I find they often promise a lot, but deliver little, and gave up on them long ago.
So what to do?
One suggestion was to install a little used browser and then move the exe preventing execution. Not bad, but oh so much fiddling just for a simple task.
I poked about the Safari settings anyway and suddenly realised I could set the default browser to any application I like. I tried setting it to MacVim, which was fun when MacVim complained about not understanding the protocol. Nearly, but too messy.
So I tried setting it to TextEdit. Bingo! Now we were cooking.
I gave it a test run:
  • "run http://www.google.com" --- fires up TextEdit but doesn't actually do anything else
  • "run some_file.html" --- contents of some_file.html end up in TextEdit
I could live with that. Let's see Adobe flash upgrade launch it's little phone-home browser tab now!
As a bonus (depending on how you look at it), I stumbled a little today when I couldn't open a link in an email. I scratched my head for a little while until I finally remembered that I'd disabled that baby!. Oh, I'll just cut and paste. How about that - I can't click links in emails. Maybe I should set it up this way on my family and friends machines too! :)