helmuthdu / conky_colors

CONKY-colors is an easier way to configure Conky
GNU General Public License v3.0
123 stars 39 forks source link

Public IP is null #10

Closed elvetemedve closed 12 years ago

elvetemedve commented 12 years ago

After login/start-up the public IP field of network category shows "(null)" value.

android-808 commented 12 years ago

If you can you provide a little more information it would help diagnose the issue a little easier. Examples would be what distro and version are you running; what Conky version and is Conky built with Lua support (not that that one matters in this scenario).

Public IP is AFAIK returned from the conkyIP script, a bash script which is called by Conky. All it does is contact a website, wait for the reply and then extract the required information from it. Therefore it will be blank if your offline. The script contains the following:

wget http://checkip.dyndns.org/ -q -O - | grep -Eo '<[[:digit:]]{1,3}(.[[:digit:]]{1,3}){3}>'

Can you confirm that wget and grep are installed. If not, please install them and then try again. If it still fails, open a console window and run Conky (conky -c /home/user/.conkycolors/conkyrc) and see if it spews out any error messages.

elvetemedve commented 12 years ago

Sorry for the short description. Network connection is up. Checked the conkyIP script, there is no problem with it as you can see in this screenshot: http://imageshack.us/photo/my-images/11/kpernykp20120504093641.png/

Here is my conkyrc http://pastebin.com/N74FgDVi created by "conky-colors --ubuntu --cpu=2 --cputemp --proc=5 --clock=digital --nvidia --hd=mix --hdtemp1=sda --network --side=right"

OS is Ubuntu 12.04 64 bit, conky version is 1.8.1 (conky-all1.8.1-6 package).

android-808 commented 12 years ago

It may be related to this: https://bugs.launchpad.net/ubuntu/+source/conky-all/+bug/979478

There is a problem reported in 1.8.1 whereby execi and execip fail to launch the command under certain circumstances. This would make more sense as I don't believe the script would generate a "(null)" string as an output from grep, usually its just a plain'ol null, empty, nada. That's why it's handy to have a little more detail in bug reports, so thanks for providing the extra info.

What happens if you try replacing: execi 10800 /usr/share/conkycolors/bin/conkyIp

with: execi value not between 1800 and 14400 /usr/share/conkycolors/bin/conkyIp

Try a smaller value first.

elvetemedve commented 12 years ago

It looks like execi causes the problem, because changing it to exec working well. There is no difference between execi number changes. So I subscribed the bug you mentioned above and waiting for a fix. Thank you for your help!

android-808 commented 12 years ago

Been trying to reply via email all day but it keeps failing.

Conky 1.9.0 was released on about 3rd may. In the changelog it mentions a fix for execi not executing correctly if the uptime is less than the interval provided to execi.

Arch has been using snapshots since the release of 1.8.1 to incorporate a number of different fixes. It may be that I have been lucky and the issue has already been fixed here. I've built 1.9.0 with Lua support from the AUR repo and it seems to be working fine here. There is a build of 1.9.0 available in a PPA for Ubuntu but it may be worth waiting to see if it gets pushed to the official repos.

I wouldn't leave it on exec if it is a laptop, or even a desktop. Your basically running it now every refresh. Every refresh is also requesting data from online source which will eat battery and drain resources.