Hacker News new | ask | show | jobs
by jpxxx 5302 days ago
This is what Bonjour (nee Rendezvous aka Zeroconf) does in life, and Windows machines do the same thing. Hostnames are not private otherwise why would you need a name in the first place?
2 comments

This brings up an interesting question; since by default on iOS the hostname is based on the user's name, what will happen when two people with the same hostname (e.g., john-smith-iphone.local) both connect to a public WiFi network? Is there automatic conflict resolution?
From what I can see on my Macbook Pro, yes, there is. One of the hostnames (the one that connected after the original) is automatically changed (in my experience it either appends a number to your current hostname or it completely changes your hostname, to something based on the network).

PS: I'm guessing here that the iOS behaviour when it comes to hostnames is similar to Lion's.

According to Apple's Bonjour documentation [1], there is automatic resolution for the `local` domain.

[1] http://developer.apple.com/library/mac/documentation/Cocoa/C...

How do you change your hostname in iOS?
In itunes, just plug in your phone, and on the left navbar under devices, click the name and change it.

Make sure to sync it afterwards

It changes the name of the device that I see in iTunes in addition to hostname, isn't it?
Or, if on iOS 5, just go into Settings > About and change it in there.
Apple -> System Preferences -> Sharing

To confirm it kicked in, open Applications -> Utilities -> Terminal and type 'hostname'. This is what anyone else on the same network sees you as. You'll also see your machine on other Macs in Finder under the 'Devices' sidebar.

(the whole story surrounding hostnames is moderately more complicated than this, but the Sharing panel on System Preferences is what informs the Bonjour local network name and that's good enough for 95% of user-facing things)

Edit: I misread, thought you were talking about OSX.