If anybody runs into this problem, i had an issue with this,
The OP mentioned using Putty, this normally insinuates Windows, however there is other ways that the following info may be useful for other systems:
Check to make sure chosen X-Server has been started on your client box.
For example if you have XMing with windows, did you run XLaunch first? If not, you can do this, but before you do that make sure you dont already
have another xming server running (look in the systray).
Next, to make sure its running correctly, look at your Xserver log log,
and make sure it started successfully. If all this is done, i found
that even with firewalls up, as long as you allowed it in the local client system firewall , your good.
If you can get only one instance of your clients X-Server running, and dont see any errors in the log, this is when you attempt the connection, otherwise you will get the errors
PuTTY X11 proxy: unable to connect to forwarded X server: Network
error: Connection refused xhost: unable to open display
Note: when you see the double digit display id, e.g.
localhost:10.0, it denotes a remote server display id.
Open the pam.d xserver file
/etc/pam.d/xserver comment out the auth console line on the file
/etc/pam.d/xserver, then restart, then retest.
Make sure X-11 forwarding is enabled in Putty, save your putty session before connection after making this adjustment
Once your in your terminal, simply run an x program, e.g.
xterm or you can test with
$ xhost +
access control disabled, clients can connect from any host
Don't test with
startx, it should already be started.
Pro tip: In xming, once you get it working, you can save a config file, then just use this config file to launch each time, once you get it working, so that you will have no further issues.