Cannot connect to non-local host error

Problem

I changed the hostname of my computer by editing /etc/hostname and /etc/hosts, as explained here. After this, whenever I ran Vim and some other programs at the terminal, this message was printed:

_IceTransSocketUNIXConnect: Cannot connect to non-local host old-hostname
_IceTransSocketUNIXConnect: Cannot connect to non-local host old-hostname

Solution

After a bit of Googling, I found that this error was originating from ICE, an IPC protocol used by X clients. This was due to the old hostname still being present in the ~/.ICEauthority file.

I deleted this file and restarted the computer. The new ~/.ICEauthority that was automatically generated had the new hostname. Also, the error did not occur after this.

Tried with: Ubuntu 14.04

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s