VPNfo - XFCE Panel VPN Monitor

Background

This one actually goes back a while. I've used Debian since my teens, always with XFCE, I can't give it enough love. A while back I threw together a wee Bash script to take advantage of XFCE's Generic Monitor and sit in the panel to give me a quick glance at my VPN status, network speeds, and ping. XFCE's GenMon is crazy useful, and really easy to wire up a script to a panel widget.

Recently, I decided I should explore something other than Debian - OK, I used openSUSE Tumbleweed for most of 2025, also awesome, maybe a bit more "good-to-go" / user-friendly out the box than vanilla Debian, but with some great features. After a while I decided to try EndeavourOS, and I have to say, I love it. After switching, I went to set it up again and found the Generic Monitor plugin wasn't installed by default, easy fix, but it prompted me to come back to this script properly rather than just copying it over as-is.

What I Updated

The original script worked fine but had a few rough edges, the code wasn't perfect, and there were a few things that could be done better. The main thing I wanted to fix was the ping check, before it was hardcoded to Quad9 with no timeout, which means if Quad9 happened to be unreachable, the script just hung. The updated version tries a short list of fallback targets in order and moves on if one doesn't respond.

Beyond that, it was mostly a tidy-up: proper shebang, set -euo pipefail, consistent quoting, [[ ]], and a couple of cosmetic fixes. Nothing dramatic, just making it the script it should have been the first time round.

What It Shows

The widget sits in the panel and displays the active VPN connection name (or "None" if not connected), current download and upload speeds, and ping in milliseconds. Everything is colour-coded: green for good, yellow for okay, red for not great. Hovering over it gives a slightly more detailed tooltip, including which host was actually pinged.

Resources

View on GitLab →

Last updated: