Flash ON / Flash OFF on MacBook Air with zsh
Posted by moonwatcher at Monday, January 10, 2011 | 2 comments
Labels: code , flash , mac
Just got my new shiny MacBook Air, which as part of Steve's escalating War On Flash, comes without a Flash plugin preinstalled.
After some googling i was fairly informed of the claims, which I find very easy to believe, that Flash shaves 2 hours of the battery life on typical web browsing, probably due to disregarding the existence of a GPU and being utilized mostly for epileptic seizure inducing advertisements. Being an Ad blocking fanatic, and not having my fine tuned squid proxy when on the go, I decided that living without Flash might not be such a bad idea...
Alas! living entirely without flash means no google analytics and sometimes no other things that i do need occasionally :(
So i whipped up two zsh aliases for flashing ON and flashing OFF.
All you need to do is move the files:
to, say:/Library/Internet Plug-Ins/Flash Player.plugin /Library/Internet Plug-Ins/flashplayer.xpt
add to your ~/.zshrc :~/.flash/Flash Player.plugin ~/.flash/flashplayer.xpt
alias flashon="ln -s ~/.flash/Flash\ Player.plugin ~/Library/Internet\ Plug-Ins/ 2>/dev/null; ln -s ~/.flash/flashplayer.xpt ~/Library/Internet\ Plug-Ins/ 2>/dev/null" alias flashoff="rm ~/Library/Internet\ Plug-Ins/Flash\ Player.plugin 2>/dev/null; rm ~/Library/Internet\ Plug-Ins/flashplayer.xpt 2>/dev/null"
Now typing flashoff or flashon in your shell (and restarting the browser...) will toggle the flash plugin loading. Flash ON Flash OFF... Daniel San.
- Post your comment
- Post Comments
- Labels: code , flash , mac

My way, you can completely disable it for all browsers. I realize its not exactly a solution for everyone, but for the hackers among you it should be quit elegant.