Unable to resolve host by name

NoOp glgxg at sbcglobal.net
Wed Nov 26 15:20:00 UTC 2008

On 11/25/2008 10:23 PM, Nils Kassube wrote:
> Bob Cortez wrote:
>> media at media:~$ hostname
>> media
>> I can ping localhost from media
>> media at media:~$ cat /etc/hosts
>>    localhost media
>>    media
>>   media
> Maybe I'm wrong because it is a bit difficult to follow this thread, but 
> it seems to me that your entry for is in the wrong hosts 
> file. For the media machine the file should be like this:
>    localhost
>    media.local media
> And on your machine mystic-laptop the file should look like this:
>      localhost
>      mystic-laptop.local mystic-laptop
>  media.local media
> Of course there could be other entries for static IPs if you want but 
> these are the ones you need if your "Remote Desktop Viewer" wants to 
> find "media.local::5900".
> Nils

How did I miss that? You are correct and I gave see where I caused the
problem by telling him:

>  localhost media
>  media
> media

When that should have been:

On mystic-laptop:  localhost mystic-laptop  mystic-laptop media

and on media:  localhost media  media

192.168.0.<IP> mystic-laptop

As for the <name>.local I found that intrepid's Network Manager seems to
like to add '.local' to things (even pings) regardless of what is in the
hosts file. I've not checked as I have NM uninstalled on my intrepid
machine, but my guess would be that if you added '.local' to the hosts
file you'd end up with <name>.local.local in some applications/actions.

More information about the ubuntu-users mailing list