Setting up adblock on 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:

wget http://winhelp2002.mvps.org/hosts.txt
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
http://code.google.com/p/kwakd/

We’ll have to download and compile it on the raspberry pi:

wget http://kwakd.googlecode.com/files/kwakd-0.3.tgz
tar -xvf kwakd-0.3.tgz
cd kwakd-0.3
./configure
make

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 !

This entry was posted in Technology and tagged . Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL.

2 Comments

  1. Reda says:

    Please let me know how to use VPN?
    reda

  2. Reda says:

    What is VPN? and how it is used? Please let me know.
    Thanks
    Reda

Post a Comment

Your email is never published nor shared.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>