IP Indicator

UUID: ipindicator@matus.benko@gmail.com
Last edited:
2 years ago 2017-10-07, 19:17 UTC
Last commit: [86a84a70] added applet ipindicator@matus.benko@gmail.com (#1347)

Applet shows different icon for different public IP addresses. Usefull when often using VPN.




IP indicator applet for Cinnamon desktop environment

Useful in case when often switching VPNs. It shows flag of country of your public IP or customized icon when matching ISP (Internet Service Provider) is found. After opening menu additionally IP, ISP and the country name are visible.

Some ISPs have not very human friendly name, therefore there is options to set ISP nickname, which will be shown instead.

How it works

After the reading about the reasons why previous IP service has shut down, I realized that spamming GET requests every few seconds to get the GEO IP, is not the most network traffic friendly solution. Therefore in this new version I introduced 2 layers of recognizing, when the public IP gets changed:

  1. periodically checking network interfaces via ifconfig command. When creating new VPN connection, usually new tun0 interface is created. This options generates no network traffic, therefore it can be repeated after X seconds.
  2. periodically calling free IP Services. More IP services are defined, through which the applet cycles and figures out only public IP. As this method generates load on the servers, it should not be used as frequent, therefore interval could be set in minutes.

After any of these layers recognized, that something has changed, another request is fired to http://ip-api.com/json. In the answer is provided full information that we need: IP, ISP, Country and CountryCode.


Clone this repository to .local/share/cinnamon/applets/

For parsing ifconfig output externall shell script is used: getNetworkInterfaces.sh. Make sure that this script has set permissions to be executable!

chmod 755 getNetworkInterfaces.sh


  1. Go to applet's configuration and set debug level to 2.
  2. Remove applet and add it again to the panel.
  3. Try to reproduce the issue.
  4. Open ticket on github and provide the logs from .cinnamon/glass.log.


Flag icons used from http://www.famfamfam.com/lab/icons/flags/.

Following IP Services are called:


screenshot settings

Log In To Comment!


Aaron E
Aaron E-1 year ago