Lightweight web browsing as I do

edit: tiny formatting correction

I usually browse the web with many instances of the graphic links2 (my own patched version) and Epiphany concurrently, depending on the complexity of the site in question.

When I was on Firefox, I used flashblock to lighten the load on my rusty old processor. I did hack it up for Epiphany around the time I made the switch, but gave up on it sometime later, as the exact blocking scheme looked pretty inefficient. I.e., I could sometimes observe an embedded object loading and taking up a lot of CPU time until the blocker has hidden it from sight. I never cared to come up with Java blocking similar to NoScript on this browser.

As I rarely used it anyway, I simply removed the Java plugin package from my system, and extracted the Flash plugin to a subfolder of my profile directory. A hackish script of mine deleted or recreated a symbolic link to the plugins on demand, which was basically the only course-grained way I have been controlling this up until today.

Actually, the following has been in my mind for some time now, but I didn't have enough motivation (or need) to implement it before. It's as simple as this: if I launch a normal browsing session (via ionice -n5 nice -n1), all such plugins are unavailable. If I have a need for viewing such content, I simply call another concurrent instance with the simple script given here. The specific profile directory contains symbolic links for Flash player and the Java runtime.

Of course a complete solution for using untrusted code and precisely confining the resource usage would involve running a virtual machine, a linux-vserver or at least a chroot of some sort, but I'll leave that as an exercise to the reader. ;-)

~/bin/flash:

#!/bin/dash
PROF="$HOME/.epiphany_private"
export MOZ_PLUGIN_PATH="$PROF/plugins"
CMD="ionice -n6 nice -n2 epiphany\
 --private-instance --profile $PROF $@"
echo "$CMD &"
exec $CMD &

Comments

Popular posts from this blog

Hidden TFTP of TP-Link routers

Tftp secret of TL-WR740N uncovered

When both Google *and* AppStatus is down