Try with unclutter, is a small program that does just that.
- http://ftp.x.org/contrib/utilities/unclutter-8.README
- http://ftp.x.org/contrib/utilities/unclutter-8.tar.Z
It's present on the repositories of various distributions, for example on Arch Linux you can install it with:
pacman -S unclutter
Then you can start it by adding an entry for it on Settings » Session and Startup » Applications Autostart or (preferred method) by adding it to your .xinitrc
file like this:
run unclutter