Posted by Mike Redrobe | Posted in Technology | Posted on 16-03-2013
Tags: raspberry pi
So you’re used to browsing on the PC with Adblock installed,
then you use the default browser (midori)
on the raspberry Pi and find the web is full of annoying ads !
This not only distracts, but also slows down page loading.
Unfortunately the version of midori on the pi does not support ad blocking direct in the browser,
While Chrome and Firefox are actually available on the raspberry Pi in the form of Chromium and Iceweasel and they do support adblock plus, they are very slow and bring the low powered Pi to a crawl.
Here is a quick way you can block all the ads. Not only will your surfing be faster but you will also save some bandwidth.
Simply use a hosts file from the guys at MVPS – they maintain a list of ads which we can use.
Open a terminal window and type (or copy and paste) the following:
sudo mv hosts.txt /etc/hosts
Ads are now gone !
We could stop there – but you will quickly realise that many sites show an error where the advert used to be. There is a way around that too – by running a local webserver that shows a blank image in their place.
Kwakd – simple webserver to serve blank webpages / images
We’ll have to download and compile it on the raspberry pi:
tar -xvf kwakd-0.3.tgz
now we can run it:
sudo ./kwakd -p 80 &
Ads are now removed, and blank images are served in their place.
Enjoy a cleaner and faster web browsing experience !