View previous topic :: View next topic |
Author |
Message |
Judge584 Tux's lil' helper

Joined: 18 Apr 2005 Posts: 109
|
Posted: Wed Mar 31, 2010 3:50 pm Post subject: [SOLVED] Networkmanager and hostname... |
|
|
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 |
|
 |
Crenshaw Guru


Joined: 23 Jun 2004 Posts: 474 Location: Poland
|
Posted: Thu Apr 01, 2010 1:03 am Post subject: |
|
|
You change configuration file for dhclient and you use dhcpcd... (-dhclient dhcpcd use flags). Dont expect wonders...  |
|
Back to top |
|
 |
Rexilion Veteran


Joined: 17 Mar 2009 Posts: 1044
|
Posted: Thu Apr 01, 2010 7:16 am Post subject: |
|
|
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 |
|
 |
Dagger Retired Dev


Joined: 11 Jun 2003 Posts: 765 Location: UK
|
Posted: Thu Apr 01, 2010 2:08 pm Post subject: |
|
|
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 |
|
 |
Judge584 Tux's lil' helper

Joined: 18 Apr 2005 Posts: 109
|
Posted: Thu Apr 01, 2010 3:16 pm Post subject: |
|
|
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 |
|
 |
Judge584 Tux's lil' helper

Joined: 18 Apr 2005 Posts: 109
|
Posted: Thu Apr 01, 2010 3:18 pm Post subject: |
|
|
Thanks a lot, will try these two solutions this evening and will come back to you just after.
Best regards. |
|
Back to top |
|
 |
Judge584 Tux's lil' helper

Joined: 18 Apr 2005 Posts: 109
|
Posted: Fri Apr 02, 2010 11:14 am Post subject: |
|
|
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 |
|
 |
Rexilion Veteran


Joined: 17 Mar 2009 Posts: 1044
|
Posted: Fri Apr 02, 2010 11:49 am Post subject: |
|
|
hmm, perhaps they should document this in the ebuild . |
|
Back to top |
|
 |
|