Monday, March 29, 2010

Flash kills my CPU. Now I kill it with a button.

I'm constantly annoyed by the jet airplane taking off noise that my computer makes as soon as I open a webpage that's chock full of Flash ( I've taken to running top in a terminal window behind my browser and killing the offending process whenever it gets to be too much. This is a ton of fun, especially because Chrome makes those cute x_x faces in the places where the Flash is no longer.

Today it dawned on me that I could get even more savvy as a Flash killer. I could add a button to the top bar in Gnome and just kill at will. Needless to say this is wonderful.

Whenever I click the button, this is executed in a terminal:

killall -9 exe

It was as easy as right clicking and adding launcher to the menu bar:

For whatever reason, "exe" is the process name that the 64-bit Flash plugin uses on my Ubuntu 9.10 x86_64 system. If you're running the standard 32-bit plugin, your going to have nsplugin(.bin?) in the process name and this might make using killall less than awesome.

Regarding the killall instead of pkill or something else, this is just my habitual way of accomplishing a task like this. Note that regardless of how you kill flash, you are going to kill all of the Flash that is currently running in ALL of your tabs; even in Chrome. This may only apply to the actual 64-bit Flash binary, but there is a single process behind all of those little animated annoyances running around in your 50 browser tabs.

Next I'll probably get sick of clicking the button and figure out how to set a keyboard shortcut in Gnome. I'm sure it is easy, but as yet messing with keyboard shortcut bindings in Gnome hasn't passed my desire versus laziness threshold.

No comments: