Following are the steps to connect to a remote x11 server,
On the client machine set the DISPLAY variable as follows,
$ export DISPLAY=server-host-name:0.0
On the server machine, enable remote connection from client
$ xhost +
N.B – use + if you are not concerned about any security issues. It enables any one to connect to your server. Use specific client name otherwise.
To read more about reasons to use remote display server and better security options , check this link.






everythingido said
On a modern Unix system supporting xauth, you never ever (ever) use xhost +, unless you’re in a network of your own.
Use xauth. Or use ssh (ssh -X, ssh -Y) to log in to the remote machine and/or as another user.