when I give the command
I get the error
Error: Can't open display: hostname:0.0
In the following page
the solution given for redhat linux is
Modify the file /etc/X11/gdm/gdm.conf and set DisallowTCP=false. Then restart X. This will enable the X server to receive network connections. You will also need to make a hole in the firewall to allow connections to the X server port (6000 IIRC).
However I cannot find /etc/X11/gdm in Ubuntu
What to do?