Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Networkmanager and hostname...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Judge584
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2005
Posts: 109

PostPosted: Wed Mar 31, 2010 3:50 pm    Post subject: [SOLVED] Networkmanager and hostname... Reply with quote

Hi,

I'm running ~arch for 64bits and using Networkmanager 0.8-r1

Like a lot of people out there, Networkmanager is changing my hostname.

I know there is a tip:

Quote:
NetworkManager reads the /etc/dhcp/dhclient.conf to determine the hostname. If no value is assigned then an IP address is set as a hostname which can cause problems opening new windows in Gnome. To prevent this, add the following to /etc/dhcp/dhclient.conf:
File: /etc/dhcp/dhclient.conf

send host-name "YOUR_HOSTNAME";
supersede host-name "YOUR_HOSTNAME";


But the problem is that I don't use dhclient, I use dhcpcd wich is according to gentoo docs way better.
So how to correct this "bug" when not using dhclient???

Best regards.

Code:
dhcppc0 ~ # emerge -pv networkmanager

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] net-misc/networkmanager-0.8-r1  USE="dhcpcd gnutls -avahi -bluetooth -connection-sharing -dhclient -doc -nss -resolvconf" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB


Look at the "dhcppc0" --> it's annoying!


Last edited by Judge584 on Fri Apr 02, 2010 11:15 am; edited 1 time in total
Back to top
View user's profile Send private message
Crenshaw
Guru
Guru


Joined: 23 Jun 2004
Posts: 474
Location: Poland

PostPosted: Thu Apr 01, 2010 1:03 am    Post subject: Reply with quote

You change configuration file for dhclient and you use dhcpcd... (-dhclient dhcpcd use flags). Dont expect wonders... :)
Back to top
View user's profile Send private message
Rexilion
Veteran
Veteran


Joined: 17 Mar 2009
Posts: 1044

PostPosted: Thu Apr 01, 2010 7:16 am    Post subject: Reply with quote

I don't know for sure, but I think this will do the trick for everything:

Code:
cat /etc/NetworkManager/nm-system-settings.conf
[main]
plugins=keyfile

[keyfile]
hostname=Charlie


The last two lines define my default hostname (no matter what mechanism is used I think...).
Back to top
View user's profile Send private message
Dagger
Retired Dev
Retired Dev


Joined: 11 Jun 2003
Posts: 765
Location: UK

PostPosted: Thu Apr 01, 2010 2:08 pm    Post subject: Reply with quote

You can specify your hostname in /etc/dhcpcd.conf
_________________
95% of all computer errors occur between chair and keyboard (TM)
Join the FSF as an Associate Member!
Post under CC license.
Back to top
View user's profile Send private message
Judge584
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2005
Posts: 109

PostPosted: Thu Apr 01, 2010 3:16 pm    Post subject: Reply with quote

Crenshaw wrote:
You change configuration file for dhclient and you use dhcpcd... (-dhclient dhcpcd use flags). Dont expect wonders... :)


Never said that!

Please read better.
Back to top
View user's profile Send private message
Judge584
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2005
Posts: 109

PostPosted: Thu Apr 01, 2010 3:18 pm    Post subject: Reply with quote

Thanks a lot, will try these two solutions this evening and will come back to you just after.

Best regards.
Back to top
View user's profile Send private message
Judge584
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2005
Posts: 109

PostPosted: Fri Apr 02, 2010 11:14 am    Post subject: Reply with quote

Ok, here is the report:

Modification of dhcpcd.conf does work, but for some reason on a fresh kde boot dns resolution doesn't work, so I have to restart Networkmanager just after kde has started: annoying.

Modification of nm-system-settings.conf does work with no glitches: great! So my problem is solved.

Best regards.
Back to top
View user's profile Send private message
Rexilion
Veteran
Veteran


Joined: 17 Mar 2009
Posts: 1044

PostPosted: Fri Apr 02, 2010 11:49 am    Post subject: Reply with quote

hmm, perhaps they should document this in the ebuild :mrgreen: .
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum