Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


wicd doesn't update resolv.conf #88

fare opened this Issue · 9 comments

4 participants

François-René Rideau viric cillianderoiste Eelco Dolstra
François-René Rideau

wicd and/or the dhcpcd it spawns won't properly update /etc/resolv.conf.

Also, networkmanager looks like it's doing it, but without going through resolvconf, which seems to be a mistake.


If I understand correctly wicd does set /etc/resolv.conf correctly according to your preferences, but then dhcpcd will clobber it. One way to workaround this is to use chattr to make it immutable: chattr +i /etc/resolv.conf. A nicer way would be to configure dhcpcd so that it doesn't do this: nohook resolv.conf (according to There isn't an option for this in the dhcpcd nixos module, so I'll see if I can add one and test this out. I guess setting networking.useDHCP will also prevent this from happening, but people may want to use dhcp to get an IP address but override the DNS servers with their own preferred servers so I think adding an extra option here would make sense.

cillianderoiste cillianderoiste referenced this issue from a commit
cillianderoiste cillianderoiste #88 dhcpcd: Add option to prevent dhcpcd from clobbering /etc/resolv.…

Without this option enabled dhcpcd will insist on overwriting
/etc/resolv.conf even if has been modified manually, or by using a
program such as wicd.
François-René Rideau

Uh, don't we want dhcpcd to use resolvconf like everyone?
Also, how else than with dhcpcd am I going to get the nameserver for my particular network???
I want my resolv.conf to reflect what dhcpcd says -- and if I have static nameservers, NixOS seems to already add them to /run/resolvconf/interfaces/static which seems to me to be the Right Thing(tm).
Or maybe I'm confused as to the particular set of options to use.

François-René Rideau

Also I probably want and not as static nameservers but as "fallback" nameservers in case no good one is found (for some value of "good" that could be configured).


I think I see what's happening: lib/python2.7/site-packages/wicd/ find_path is used to find the full path to resolvconf, it only looks in standard system paths, so that should be fixed.

François-René Rideau

Note that the problem is not ONLY with wicd. It looks like dhcpcd and network-manager are also misbehaving, though in ways that kind of make do by default.

Eelco Dolstra

Dhcpcd uses resolvconf, so it does the right thing as far as I can tell. Example:

$ cat /run/resolvconf/interfaces/wlan0 
# Generated by dhcpcd from wlan0

However, that's NixOS' dhcpcd service, not one spawned by wicd.


I guess that adding openresolv to the inputs and ensuring that it is in the PATH will help for wicd. (I can try that later on).

cillianderoiste cillianderoiste referenced this issue from a commit in NixOS/nixpkgs
cillianderoiste cillianderoiste wicd: NixOS/nixos#88 add resolvconf to PATH for wicd
with this patch resolvconf is used to set the DNS via wicd, although
this doesn't seem to stop dhcpcd from clobbering /etc/resolv.conf

I've added the path to resolvconf to wicd, now the /etc/resolv.conf it creates looks like this. /etc/resolv.conf does now claim to be generated by resolvconf, but that doesn't stop dhcpcd from clobbering it shortly afterwards. Restarting dhcpcd will trigger this immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.