Monthly Archives: May 2011

Browser refresh for Lazy Web Developers

Ever got annoyed or tired with editing a css/html file, saving, alt-tab to browser, refresh?
Why not just save and then the browser refreshes itself, right?

Well, if you were in Windows / Macland and use Firefox, you’re in luck! You have the XRefresh Plugin.

If you are on Linux, then you’re in better luck because you get to write your own script! Well, not entirely, but you get to use incrond (just luck cron, only in) and write your own script to be used by it. Just follow this guide and you’d set it up in no time. Take note that it works even if you’re not using Textpattern and thus it needs a bit more than following every step as you have to skip some of the things related to Textpattern.

If you ran into the “user root is not allowed to use incron” error, the solution is here. For your convenience, I quote:

rt:~# incrontab -l
user 'root' is not allowed to use incron

This error may be fixed in one of two ways:

  • Allow the root user to make use of incron:
    By editing /etc/incron.allow, adding ‘root’ to it.
  • Allowing all local users the ability to use incron:
    By removing the file /etc/incron.allow.

Especially on a dual screen setup, this would save you a couple more calories per save (and thereby increased fat reserves.) On the bright side, it can delay Carpal Tunnel Syndrome by, I don’t know, a year or two? Haha.

CTS is a developer’s worst nightmare.