Was also having this kind of error:

# xawtv -hwscan
xdpyinfo: unable to open display "".
This is xawtv-3.95.dfsg.1, running on Linux/i686 (2.6.24-19-generic)
Error: Can't open display:
...