I wrote an ad-hoc adblocker out of /etc/hosts files and shell scripts for Mac OS X. (The shell scripts just block and unblock--unblocking is necessary sometimes for a chess site I use which detects adblockers.) Usually restarting is overkill for a new hosts file to take effect--on Mac OS X `dscacheutil -flushcache` will reinstate a hosts file. Ubuntu must have a similar command.
I use the self control app on Mac OSX.
Ubuntu. I could be wrong though - I read it somewhere and never tested it out.
Re:The Top Idea in Your Mind
by polynomial on Thursday July 22, 2010 @10:53AM
(#1538290)
Wait, you restart your whole system anytime you edit /etc/hosts ?
Our of curiosity, what operating system do you use? On Windows, hosts entries take effect immediately. No need to restart.