From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-user+bounces-101879-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1MxzNm-000875-OW
	for garchives@archives.gentoo.org; Wed, 14 Oct 2009 08:38:54 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 4C984E07CF;
	Wed, 14 Oct 2009 08:38:52 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id 29B07E07CF
	for <gentoo-user@lists.gentoo.org>; Wed, 14 Oct 2009 08:38:52 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
	by smtp.gentoo.org (Postfix) with ESMTP id BE337B4E94
	for <gentoo-user@lists.gentoo.org>; Wed, 14 Oct 2009 08:38:51 +0000 (UTC)
X-Virus-Scanned: amavisd-new at gentoo.org
X-Spam-Score: -0.507
X-Spam-Level: 
X-Spam-Status: No, score=-0.507 required=5.5 tests=[AWL=0.025,
	BAYES_00=-2.599, RCVD_NUMERIC_HELO=2.067]
Received: from smtp.gentoo.org ([127.0.0.1])
	by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id bDtclIPE11Vw for <gentoo-user@lists.gentoo.org>;
	Wed, 14 Oct 2009 08:38:45 +0000 (UTC)
Received: from lo.gmane.org (lo.gmane.org [80.91.229.12])
	(using TLSv1 with cipher AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTP id 203D3B4E56
	for <gentoo-user@gentoo.org>; Wed, 14 Oct 2009 08:38:44 +0000 (UTC)
Received: from list by lo.gmane.org with local (Exim 4.50)
	id 1MxzNX-0007WT-TC
	for gentoo-user@gentoo.org; Wed, 14 Oct 2009 10:38:39 +0200
Received: from 203.219.162.75 ([203.219.162.75])
        by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <gentoo-user@gentoo.org>; Wed, 14 Oct 2009 10:38:39 +0200
Received: from lie.1296 by 203.219.162.75 with local (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <gentoo-user@gentoo.org>; Wed, 14 Oct 2009 10:38:39 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: gentoo-user@lists.gentoo.org
From:  Lie Ryan <lie.1296@gmail.com>
Subject: [gentoo-user]  Re: Problem with gethostname() returning incorrect   value
Date:  Wed, 14 Oct 2009 19:37:58 +1100
Message-ID: <hb42li$sd6$1@ger.gmane.org>
References:  <havbe8$hj6$1@ger.gmane.org> <4AD3401C.7080302@gentooist.com> <hb08tv$tfa$1@ger.gmane.org>
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
Mime-Version:  1.0
Content-Type:  text/plain; charset=UTF-8
Content-Transfer-Encoding:  7bit
X-Complaints-To: usenet@ger.gmane.org
X-Gmane-NNTP-Posting-Host: 203.219.162.75
User-Agent: Thunderbird 2.0.0.23 (X11/20091012)
In-Reply-To: <hb08tv$tfa$1@ger.gmane.org>
Sender: news <news@ger.gmane.org>
X-Archives-Salt: 32db7ee9-4756-4e75-9ef4-622863735e7f
X-Archives-Hash: 0262cd15caf70f51e4d64beb2bc8a679

Lie Ryan wrote:
> [1] for some reason, after setting HOSTNAME to localhost I can't start
> new GUI program/create new window after NetworkManager/nm-applet is
> running. I suspect there is some NetworkManager settings lying around
> somewhere that resets the name to lieryan and the change confused X.

btw, in any case someone in the future is wondering; the
NetworkManager's hostname settings are stored in /etc/dhcp/dhclient.conf

on these line:
send host-name "HOSTNAME";
supersede host-name "HOSTNAME";

after changing both this and the one in /etc/conf.d/hostname the
computer's hostname is changed for good with none of the side effect.