# networkmanager changed my hostname

## Makro

Hi all.I installed networkmanager.All works great but my hostname was changed to the "dhcppc0"

Do you have you any ideas ?

----------

## Princess Nell

You should find a reference to it somewhere in this forum, but you can tie down the hostname in Networkmanager with

```

# cat /etc/NetworkManager/nm-system-settings.conf

...

[keyfile]

hostname=myhostname

...

```

No, I don't find having to specify the hostname in more than place particularily satisfying either ...

----------

## Makro

Thank you man.Its working but just in login screen.In my console is still bad name   :Confused: 

----------

## d2_racing

Hi, can you post this :

```

# cat /etc/hosts

```

----------

## kernelOfTruth

this tool is causing so much frustration - unbelievable !   :Confused: 

networkmanager 0.8.2* is missing 2 important patches from 0.8-r1:

networkmanager-0.8-confchanges.patch

networkmanager-0.8-read-hostname.patch

when trying to apply them both fail

the 1st patch is the reason why it stopped working for me after 0.8-r1, the 2nd why my gnome-session keeps on failing and changing the hostname   :Evil or Very Mad: 

edit:

 networkmanager-0.8.2-read-hostname.patch 

just add:

```
   # Hack keyfile plugin to read hostname file, fixes bug 176873

   epatch "${FILESDIR}/${P}-read-hostname.patch"   
```

again below:

```
   # accept "gw" in /etc/conf.d/net (bug #339215)

   epatch "${FILESDIR}/${P}-accept-gw.patch"
```

I don't know if it works correctly but I'll see in the future

give it a try - it should do no harm  :Wink: 

----------

