Re: Changing hostname in Cocoa?
Re: Changing hostname in Cocoa?
- Subject: Re: Changing hostname in Cocoa?
- From: Vince DeMarco <email@hidden>
- Date: Mon, 15 Oct 2001 11:21:43 -0700
On Monday, October 15, 2001, at 08:14 am, David Lee wrote:
I require my application to change the hostname of my computer, the
reasons are irrelevant to this post but how do I go about doing this in
Cocoa?
I thought I was pretty good on UNIX systems and it turns out that I can't
even do this manually. I tried editing /etc/hostconfig and changing the
HOSTNAME=evolution part to the name of my choice and fair enough, my
command prompt reads with the correct hostname, but it's only asthetic so
how do I enable this to work so that I can type ftp evolution from my
console and get to my own machine just as with localhost?
I heard that OSX doesn't use /etc/hosts in multiple user mode and it uses
netinfo for this sort of thing. Is there a guide to netinfo or something?
Is it even possible to change the hostname in Cocoa?
Look up the docs for
sethostname
do this
man sethostname
vince