The i3 FAQ has migrated to All content here is read-only.
Ask Your Question

How to test NetworkManager/OpenVPN status with i3status.conf ?

asked 2013-01-18 18:44:22 +0000

Spheerys gravatar image

updated 2013-01-18 18:46:49 +0000

With the original script, the VPN test is made on the pidfile of vpnc In my case, I'm using NetworkManager to connect my computer to my OpenVPN server and I don't have any pid file when the VPN connection is active

Is there a way to test if the VPN connection, managed by NetworkManager is active ?

I though to test the "not empty" result of the command :

ip addr | grep tun

... but I don't know how to test it inside the i3status.conf file...

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted

answered 2013-01-18 19:07:50 +0000

Michael gravatar image

Nope, you need to wrap i3status with an external script in order to achieve that. See

edit flag offensive delete link more

answered 2015-02-18 09:26:35 +0000

tatpat gravatar image

updated 2015-02-18 12:35:57 +0000

Adaephon gravatar image

One could use the following settings (example from the i3status manpage) to determine the VPN status:

order += "path_exists VPN"

path_exists VPN {
     # path exists when a VPN tunnel launched by nmcli/nm-applet is active
     path = "/proc/sys/net/ipv4/conf/tun0"
edit flag offensive delete link more

answered 2015-07-14 10:06:04 +0000

biocyberman gravatar image

Yes this was tricky. I finally figured out that I can use /sys/class/net/tun0/dev_id for this.

edit flag offensive delete link more

answered 2015-04-18 13:54:25 +0000

hi, try use /sys/class/net/tap0 as pidfile

edit flag offensive delete link more

Question Tools



Asked: 2013-01-18 18:44:22 +0000

Seen: 3,292 times

Last updated: Jul 14