Friday, August 31, 2012

Infamous _X11TransSocketINETConnect() can't get address for localhost



I use the Xming as an Xserver
In Windows, look for the shortcut to start Xming. 
Right click to go to properties.
add -ac to your XMing shortcut:
"C:\Program Files\Xming\Xming.exe" :0 -clipboard -multiwindow -ac 
The -ac parameter allows everyone to connect, like ‘xhost +’

Start Xming
Open putty -> connection -> SSH -> check Enable X11 forwarding -> put the actual hostname:0.0
go back to session and login.
export DISPLAY=HOSTNAME:0.0
You can check in /etc/ssh/ssh_config if X11 forwarding is enabled


3 comments:

  1. This is really not a very good solution because it doesn't solve the underlying problem. Localhost should always resolve!

    Things to check:
    does /etc/hosts have an entry for 127.0.0.1 named "localhost" ? It should.
    does /etc/nsswitch.conf have an entry like this:
    "hosts: files dns"

    I ran into this very issue today and fixing /etc/nsswitch.conf is what fixed it for us.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  2. Many thanks Stephen for your comment and for the resolution you provided.

    ReplyDelete