5

I'm just wondering how can I get IP address showing on the desktop from using Conky? Do I need to use conky (sudo apt-get install conky-all) or not? As I haven't done it before.

I'm thinking something like this: http://vindsl.com/images/vindsl-desktop-24-oct-2013-1.png

Adam
  • 55
  • 1
  • 1
  • 10
  • LM-sensors deal with hardware sensors on the motherboard, they certainly have no idea about your IP-configuration. – guntbert Sep 13 '15 at 11:15
  • Ok, how do I get IP address showing on my desktop? Do I have to use sudo apt-get install conky-all or not? – Adam Sep 13 '15 at 11:17
  • Do I have to use Conky to get this affect: http://vindsl.com/images/vindsl-desktop-24-oct-2013-1.png or not? – Adam Sep 13 '15 at 11:42

5 Answers5

4

You need to use Conky, there's no equivalent as far as I know.

Here's how to display IP address info:

Conky can execute commands with the object ${exec command}.

I don't know whether you want your internal or external IP shown on your configuration, but if you can find a way to display that information in the command line interface and then plug that command into Conky you should have what you want.

For external IP address, something like this should work:

${exec curl -s www.icanhazip.com}

For internal IP address, for multiple interfaces you'll want something like

${if_existing /proc/net/route wlan0}
${addr wlan0}
${else}${if_existing /proc/net/route eth0}
${addr eth0}
${else}
Network disconnected
${endif}${endif}
alibabzo
  • 64
  • 2
3

make a simple script in home directory:

wget http://ipinfo.io/ip -qO -

save it as ip.sh

then just add this line to ~/.conkyrc file

Public IP: ${exec sh ip.sh}

Your output will be:

Public IP: 123.123.123.123

It's simple as that.

Xamidovic
  • 670
  • 2
  • 6
  • 15
2

You can run this simple command

curl ipconfig.in/ip

To know what is you Public IP Address : www.IPconfig.in

Bella
  • 21
  • 2
0

This should work as well

${exec hostname -I | awk '{print $1}'}
riegersn
  • 101
0

I think it's probably best to do this with execpi so you don't flood the IP service site with requests (possibly getting your IP banned).

${execpi 604800 curl www.icanhazip.com)

Which should only update once (at startup), and then once a week after 604,800 seconds. Update that value to run as often as you think it should...

Manius
  • 101
  • 1