I have two Macs on the same network, both plugged into my internet router. I have screen-sharing set up on one of them, so I can connect to it using command-K in the Finder with a vnc://
URL, and that works great.
My router assigns IP addresses using DHCP, which in general is a good thing, but it means if a machine gets restarted or a DHCP lease gets renewed, I don't know what IP address to connect to (without walking over to the other machine to find out).
Surely my Mac already knows the IP address of my other Mac: in the Finder, I can see my other Mac's name and icon/type in the sidebar! Unfortunately, Get Info doesn't display the IP address, or anything else useful about it.
How can I find out the IP address of my other Mac, perhaps using Zeroconf/Bonjour? I'm fine with a command-line solution, if there's a simple one.
EDIT: I'm running Lion, and I think that OS X screen sharing broadcasts a Bonjour service announcement for it, but Lion's connect-to-server dialog box doesn't take advantage of it. If this is something Mountain Lion does, knowing that would be helpful, too!
ping other-computer’s-name
)