My mac has many names. With no signs of regret does it happily use
different names in different social contexts. Macs are known to do this.
Sure, you can set a name under system preferences, but
uname -a will
still return randomness. I wouldn’t care about this if it wasn’t for the
fact that Unison gets confused. There seems to be two ways around this
- Just fix Unison as described
UNISONLOCALHOSTNAMEenvironment variable. Aah - there’s a little caveat in the Unison FAQ: For the Aqua applications, you need to do things the Mac way and populate
~/.MacOSX/environment.plistas documented here.
- The other approach which seems like a good idea anyway is to use
scutilto set good values for
ComputerNameis what you set in system prefs). More on this in this thread.
defaults write ~/.MacOSX/environment UNISONLOCALHOSTNAME foobar scutil --set ComputerName foobar scutil --set LocalHostName foobar