Skip to content

Instantly share code, notes, and snippets.

@robin-a-meade
Last active May 2, 2020 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save robin-a-meade/b37f84b6d0834241abdde95319ff14bd to your computer and use it in GitHub Desktop.
Save robin-a-meade/b37f84b6d0834241abdde95319ff14bd to your computer and use it in GitHub Desktop.
A patch to make vpn-indicator-shell-extension work for SNX

A patch to make vpn-indicator-shell-extension work for SNX

This is a patch to the VPN Indicator Gnome Shell Extension to make it work for the SNX VPN.

Links for the VPN Indicator Gnome Shell Extension:

This patch makes it work with the SNX VPN.

Instructions

  1. Download the patch to ~/Downloads/vpn-indicator-shell-extension.patch

  2. Clone the repo to a temporary directory

cd "$(mktemp -d)"
git clone https://github.com/howdoicomputer/vpn-indicator-shell-extension.git ./
  1. Apply the patch
patch < ~/Downloads/vpn-indicator-shell-extension.patch
  1. Install the modified extension
./install.sh

Notes

There's a fork that uses icons instead of text:

A more sophisticated approach could probably be modelled after the NordVPN Local extension:

index 2dfed8b..d688227 100644
--- a/extension.js
+++ b/extension.js
@@ -23,7 +23,7 @@ const VpnIndicator = new Lang.Class({
},
_checkVPN: function() {
- let [res, out, err, exit] = GLib.spawn_sync(null, ["/bin/bash", "-c", "ifconfig -a | grep tun0"], null, GLib.SpawnFlags.SEARCH_PATH, null);
+ let [res, out, err, exit] = GLib.spawn_sync(null, ["ip", "link", "show", "tunsnx"], null, GLib.SpawnFlags.SEARCH_PATH, null);
return exit;
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment