The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
1

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

asked Jan 18 '13

Spheerys gravatar image

updated Jan 18 '13

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

4 answers

Sort by » oldest newest most voted
0

answered Jan 18 '13

Michael gravatar image

Nope, you need to wrap i3status with an external script in order to achieve that. See http://i3wm.org/i3status/manpage.html#externalscriptsprogramswith_i3status

2

answered Feb 18 '15

tatpat gravatar image

updated Feb 18 '15

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

answered Jul 14 '15

biocyberman gravatar image

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

0

answered Apr 18 '15

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

Question Tools

2 followers

Stats

Asked: Jan 18 '13

Seen: 3,292 times

Last updated: Jul 14