maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Ad blocking (https://talk.maemo.org/showthread.php?t=14729)

ghoonk 2008-01-15 12:29

Re: Ad blocking
 
Is there any way I can copy the existing hosts file out of the N800, edit it on my PC (WinXP) and then copy it back into the N800?

my commandline skillz is teh fail (i can lolcattalk too), and with things working all fine and dandy on my tablet now, I would REALLY hate to screw it up.

GeneralAntilles 2008-01-15 12:33

Re: Ad blocking
 
Quote:

Originally Posted by ghoonk (Post 128030)
Is there any way I can copy the existing hosts file out of the N800, edit it on my PC (WinXP) and then copy it back into the N800?

The steps outlined on the last page are hardly advanced stuff. Just do exactly as it says and everything will work fine.

PJE 2008-01-15 12:48

Re: Ad blocking
 
Quote:

Originally Posted by ghoonk (Post 128030)
Is there any way I can copy the existing hosts file out of the N800, edit it on my PC (WinXP) and then copy it back into the N800?

You can, using 'mv hosts /media/mmc2/hosts' (at which point the file can be seen via USB on the PC), but be aware that PC files can have different end of line terminators than linux files... so I'd recommend doing it on your N800 directly.

You are not actually editing the host file, all you are doing is making a new host file by joining the current host file (which has your machine ID) and the ad blocking list to create the new super host file.

ghoonk 2008-01-15 12:53

Re: Ad blocking
 
That worked. Application Manager works fine too.

Now to test it over the next couple of days to see what kind of improvement I can get. I've turned off AB+ just to get an idea of how this works.

Thanks, guys!

coffeedrinker 2008-01-15 17:51

Re: Ad blocking
 
Quote:

Originally Posted by free (Post 127995)
Exactly,
That's why in the few lines, I *append* the ad-blocking host to the current original one.

What got me into trouble was using the same hosts file after an OS update. The localhost line changes with each update.

Redshift 2008-03-20 00:27

Re: Ad blocking
 
Thank you for the very clear instructions! I have modified my hosts file using the one from hosts-file.net following the posted instructions. Now however instead of ads I'm seeing the CSS placeholders and messages telling me server could not be found. I think I'm also supposed to use UserContent.css or Greasemonkey scripts to hide those now defunct css elements right? Is there a preference for which one?

Edit: Did some googling and yeah, I figured it out. However, http://www.floppymoose.com isn't working for me. Anyhow, I found a website that suggests that using Mozilla's built in image blocking may be more effective than using CSS filtering.

http://www.gozer.org/mozilla/ad_blocking/

Anyone use this?

n9mjg 2008-03-20 12:56

Re: Ad blocking
 
Frankly, it think privoxy is easier to use and does a more thorough job of ad blocking. Just install the deb and point set the proxy settings and your done.

traveller604 2008-03-20 13:11

Re: Ad blocking
 
Is there by the way some faster way to switch proxies? Most of the time I'm behind privoxy, but every now and then I need to be in my uni's "ip space" and frankly it's a ***** to change those settings.. so many clicks..

iamthewalrus 2008-03-20 20:04

Re: Ad blocking
 
Quote:

Originally Posted by traveller604 (Post 157745)
Is there by the way some faster way to switch proxies? Most of the time I'm behind privoxy, but every now and then I need to be in my uni's "ip space" and frankly it's a ***** to change those settings.. so many clicks..

Create a new connection that doesn't have the proxy settings set, and then switch when necessary.

brontide 2008-03-20 21:24

Re: Ad blocking
 
I did a

mv /etc/hosts /etc/hosts.orig and then created the following script.

Code:

#!/bin/sh
cp /etc/hosts /etc/hosts.bak
wget -q -O - http://www.mvps.org/winhelp2002/hosts.txt | sed -e 's|127\.0\.0\.1  localhost|127\.0\.0\.1 Nokia-N810-50-2 localhost|' > /etc/hosts

Note the one item will need to be changed based on your original hosts file. I love CPU non-intensive adblocking tricks. I also run my own .css rules for the sites I visit.


All times are GMT. The time now is 16:27.

vBulletin® Version 3.8.8