Try:
Code:
export DISPLAY=:0.0
xhost +localhost
and if that doesn't work, try for the 2nd command
to see what happens.
If that doesn't work make that sure your xserver is listening to port 6000
Code:
netstat -tan|grep 6000
If it's not listening, then your xserver is started with the "--nolisten tcp" option. Check your xserver startup files to remove it.