The answer on stackoverflow and also a more linux focused one on linuxedevcenter.com as given as reference in the article.