brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.17k stars 615 forks source link

Teredo interface's addr is always No Address #168

Closed txtsd closed 6 years ago

txtsd commented 8 years ago

The teredo interface only has an IPv6 address, but using ${addr teredo} only ever shows No Address. Is there a way to make this work without resorting to external scripts? If there isn't, it would be nice for conky to support it natively.

v1.10.1

troxor commented 8 years ago

Try the v6addrs configuration directive!

${v6addrs -s g eth0} <-- replace with your interface name, of course

Also, cat /proc/net/if_inet6 to verify the source of the information. If you still get 'No Address', could you try compiling the latest conky from git and providing output of that file? I'm investigating a bug where I'm seeing the same thing.

txtsd commented 8 years ago

@troxor It shows me 2 addresses for teredo, and drastically increases the width of my conky widget. Can I make it just pick the external IP? I tried the various -s flags, but all the outputs are the same. Currently running HEAD.

troxor commented 8 years ago

Yep, the catch is that ipv6 was designed to support multiple addresses per interface (to wit: ipv6 privacy extensions), so it's easy to pick out "your" ipv4 address, but not so for ipv6. I have noticed the same thing, and reading the code, the flags are more like display options than filters (when they work). I'm looking into what changes would make this more useful, but in the meantime, I found it easiest simply to set a maximum_width parameter in conky.config = {}.

lasers commented 6 years ago

How should I address this problem? Is there still a need for an elegant solution or do I close this?

lasers commented 6 years ago

One month later and no response. I think we're done here.

@troxor Thanks for helping out with v6addrs configuration directive. :+1: