3

In my .conkyrc file I use some shell-scripts and call it via {execi}.

The problem is it doesn't execute these scripts on startup, e.g. get_public_ip.sh doesn't need to get called every 30 seconds like the get_cpu_temp.sh, so I use:

{exceci 3600 get_public_ip.sh}

with this command I have to wait one hour until I get my public IP because conky doesn't call the script on startup!

How can I configure conky so it will call all {execi} lines on startup?

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
makim
  • 573
  • Strange setup. The machine should run some kind of DHCP client whenever it gets connected to a newtork, not some cobbled together script each hour. – vonbrand Mar 04 '13 at 17:42
  • yes it does but to the DHCP request goes to my wlan router and there I get 192.168.x.x! I want to display my public IP in conky, like 81.192.xxx.xxx – makim Mar 04 '13 at 18:59
  • Then you should configure that IP as static, or configure the DHCP server to asign it to your machine. – vonbrand Mar 04 '13 at 19:34

1 Answers1

3

As far as I can tell execi should work, not sure why it doesn't. In any case, I get conkyto show my public IP as follows:

${texeci 3600 wget -qO - http://cfajohnson.com/ipaddr.cgi}

Try replacing execi with texeci, see if that helps.

Another possible problem is that conky may be loaded before your connection is established. If so, it will run your execi command on startup but it will get no result since you are not connected yet. I get around this type of problem by launching conky through a wrapper script that looks like this:

#!/bin/bash
sleep 20
conky
terdon
  • 242,166