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

3
  • LM-sensors deal with hardware sensors on the motherboard, they certainly have no idea about your IP-configuration.
    – guntbert
    Sep 13, 2015 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, 2015 at 11:17
  • Do I have to use Conky to get this affect: vindsl.com/images/vindsl-desktop-24-oct-2013-1.png or not?
    – Adam
    Sep 13, 2015 at 11:42

5 Answers 5

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}
0
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.

2
  • 6
    or just ${exec wget http://ipinfo.io/ip -qO -}
    – Phoenix87
    Aug 1, 2016 at 20:48
  • Hey I have a doubt, what does 0 mean here? I know that q means quiet.
    – Neerkoli
    Feb 13, 2022 at 14:22
2

You can run this simple command

curl ipconfig.in/ip

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

0

This should work as well

${exec hostname -I | awk '{print $1}'}
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...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .