VPN Look-Out Applet

UUID: vpnLookOut@claudiux
Last edited:
1 month ago 2020-02-11, 07:42 UTC
Last commit: [6e5c5786] [vpnLookOut@claudiux] v3.5.0: Some bug fixes and code cleanup (#2754)

A Cinnamon applet that watches over the VPN link, displays its status, allows to connect at start-up to the last VPN used, allows to reconnect the VPN link if it incidentally drops, and can stop or restart VPN-related apps according to the state of the VPN.

README

Close

VPN Look-Out Applet

Important!

In order to be sure to download the latest version of VPN Lookout, use this link rather than the Download button at the top of this page.

Summary

This is a simple applet that I wrote because I often saw too late that my VPN (Virtual Private Network) was shut down.

This applet shows the state of the VPN (connected or disconnected) using colored icons. It can be used on horizontal or vertical panel.

But also, it can:

  • try to restart the VPN link when it shuts down incidentally,
  • close the VPN-related apps (like Transmission, qBittorrent, Deluge...) when your VPN shuts down, and restart them when your VPN link becomes active again,
  • quickly close a VPN-related app if it is started when the VPN is idle.

Status

Fully supported by Author, under continuing development and in continuous use on several machines, running with Linux Mint, Fedora or Archlinux.

Features

The VPN Look-Out Applet normally shows an icon that changes color depending on the state of the VPN connection :

  • Green: the VPN is connected.
  • Red: the VPN is disconnected.
  • Grey: waiting for VPN status (only when the applet starts, for a few seconds, or if it is misconfigured).

When hovering over or click on the icon, the status of the VPN is displayed with, between brackets, the name of the connection and the network interface used. By example:

VPN: Connected (Amsterdam / tun0)

The most important settings are accessible by the menu (by left or right click on applet icon) ; they are shown in bold in the list below. For all of them, see Settings in the Right Click Menu.

Settings :

  • VPN Network Interface (default: tun0).
  • VPN Name (name of the connection, automatically filled in, you can change for other existing connection name).
  • Try (or don't try) to connect to VPN when this applet starts.
  • Deactivate this applet at startup (only if the previous option is unchecked). This saves resources, but your connections and applications are no longer monitored. You can activate vpnLookOut from its menu, or using keyboard shortcut, or middle-clicking on its icon.
  • Try (or don't try) to reconnect to VPN when it shuts down incidentally.
  • Refresh Interval for Display (from 1 to 60 seconds).
  • Type of Display : Icon, with or without text 'VPN'.
  • Emit (or don't emit) a sound alert when VPN shuts down.
  • Emit (or don't emit) this sound alert when this Applet starts, if VPN is down.
  • Shut down (or not) properly Transmission as soon as VPN falls. (Cinnamon 2.8 to 3.6.)
  • Try (or don't try) to restart Transmission as soon as VPN restarts. (Cinnamon 2.8 to 3.6.)
  • Manage VPN-related Apps. (Cinnamon 3.8 and over.)
  • Log the status of the VPN link, and the status of the VPN-related Apps.

The left click menu also contains:

  • A button to connect to (or disconnect from) the last VPN used. This button appears only if the option "Try to reconnect to VPN when it shuts down incidentally" is unchecked.
  • A list of all VPN connections available. Click on one of them to change of VPN connection ; it disconnects from actual (if any) and connects to new.

A middle-click on the icon of this applet, or the keyboard shortcut v (which you can personalize), is a quick way to:

  • connect to the last VPN used if it is "off";
  • disconnect from the VPN if it is "on".

Translations

The vpnLookOut applet is designed to allow translations of messages (initially in English). A vpnLookOut.pot template file is available, you can use it with software such as poedit to translate these messages.

Languages already available: English, French, Spanish, Italian, Danish, Swedish.

The installation of the available languages is done automatically.

Translations are usually provided by people who are fluent in the language.

Any new translation will be welcome.

Users, please note that I will not be able to take responsibility for the accuracy of translations that I would not have done myself!

Contributions

While comments and suggestions are always welcome, any contributions considered should be discussed. Changes can have many unintended consequences and the integrity of the applet is paramount. Unsolicited pull requests will never be allowed with the exception of urgent and critical bug fixes from the Cinnamon team.

Requirements:

For full facilities including notifications and audible alerts the zenity, sox, libsox-fmt-mp3 and xdg-utils libraries must be installed. They can be installed wih the Synaptic Package Manager or using the following terminal command:

  • LinuxMint: apt update && apt install zenity sox libsox-fmt-mp3 xdg-utils
  • Fedora: sudo dnf update && sudo dnf install zenity sox xdg-utils
  • Archlinux: sudo pacman -Syu zenity sox xdg-utils

Note that this applet helps you to install these dependencies, if any.

Preconizations:

Transfere the /tmp directory into memory (Useless for Arch)

It is recommended to transfere the /tmp directory into memory, for two reasons:

  • Make applet execution faster.
  • Reduce hard disk wear (especially if it's a SSD).

To do this, add this line at the end of the file /etc/fstab; then, restart the computer: tmpfs /tmp tmpfs defaults,size=500M 0 0 (Beware to put the final character 's' at the 'defaults' word. In the size parameter, 'M' is for MB, 'G' is for GB; be careful, the memory allocated for /tmp is no longer available for the rest.)

Install at least Transmission

You can install (or re-install) Transmission (torrent client): apt install transmission transmission-gtk

Automatic Installation

Use the Applets menu in Cinnamon Settings, or Add Applets to Panel in the context menu (right-click) of your panel.

Manual Installation:

  • Install the additional programs required.
  • Download the VPN Look-Out Applet from the Spices Web Site.
  • Unzip and extract folder vpnLookOut@claudiux to ~/.local/share/cinnamon/applets/
  • Enable the applet in System Settings -> Applets.
  • You can also access the Settings Screen from System Settings -> Applets, or from the Applets Context menu.

CHANGELOG

Open

Log In To Comment!

51 Comments

Paul
Paul-1 week ago
I have this on Linux Mint 19.3 So far everything appears to be working fine except the actual app kill switch! So, I added Brave Browser to the apps manager and told it to shut down if my vpn is off. When I test it by opening Brave then turning off my vpn connection, the applet does re-start my vpn, but doesn't close down Brave Browser. I have tried both setting it to shutdown when the VPN goes down and restart when it come back up again. I have also tried it just on the shutdown setting. Either way, the browser stays open. The Look Out logs show the VPN disconnect and restart, but nothing else. Any suggestions?
Bundy01
Bundy01-2 months ago
Bonsoir claudiux, cet applet est super mais ne gère que l'interface tun0. Mon vpn crée une interface du type 'nom_VPN-serveur' quand j'utilise un protocole autre que Open-VPN. J'ai remarqué quand supprimant manuellement l'interface tun0, ça marchait. Mais si je change de serveur et en voulant refaire la manipulation, l'applet fait planter X. La solution serrait peut-être de supprimer automatiquement l'interface au démarrage de l'applet et de pouvoir réactualiser avec le menu quand l'utilisateur change de serveur.
claudiux
claudiux-2 months ago
Bonsoir Bundy01, Je suis justement en train d'améliorer cette applet et d'y ajouter des fonctionnalités. Celle-ci est intéressante, mais comme personnellement je n'ai que des VPN qui utilisent l'interface tun0, j'aurai besoin d'un testeur. Voulez-vous bien ouvrir une "Issue", afin que nous puissions échanger plus confortablement, svp ? Merci à vous.
Bundy01
Bundy01-2 months ago
Ok, je fait ça :)
ah Jun
ah Jun-2 months ago
Hmm ... installed the dependencies, installed the applet. Gears are greyed out. Next is a warning triangle & ! saying: 'This applet contains function calls that could potentially cause Cinnamon to crash or freeze. If you are experiencing crashes or freezing, please try removing it.' Downloaded the version suggested by the link above, ... same grey gears & warning ... No crash or freeze at this point, but VPN Look-out does not work either, Cinnamon is 19.3 Tricia, Applet Version is 3.4.2 (2019-12-11 00:42:15) Any suggestion?
claudiux
claudiux-2 months ago
It looks like you only downloaded this applet. Please add it to a panel (from the Manage applets tab).
ah Jun
ah Jun-2 months ago
Spot on claudiux, thank you! Everything works fine now, great applet & help, very nice contribution, thank you!
dr-bludstul
dr-bludstul-2 months ago
Nice, I like it. Works fine.
Capitalmind
Capitalmind-3 months ago
Applet that should do everything I need however I am unable to activate it in the applet manager, the settings (gear) icon is greyed out. I use OpenVPN via the mint GUI for network settings in the tray and usually import .ovpn files to use. I thought this applet would help ensure I was always connected but I cannot seem to get it to work. I have the latest zenity sox libsox-fmt-mp3 xdg-utils installed?
claudiux
claudiux-3 months ago
Hi Capitalmind, Have you added this applet to a panel? What versions of vpnLookOut and Cinnamon are you using?
Capitalmind
Capitalmind-3 months ago
New to Applets, I seem to have not added it to the panel correctly and now it is showing. Using Mint 19.3 Cinnamon version 4.4.5
claudiux
claudiux-3 months ago
Glad that vpnLookOut is working properly. I hope you find this applet useful.
Andrew G.
Andrew G.-5 months ago
Hello, the applet mostly seems to be running smoothly but I cannot choose what apps are managed by the applet. There is no way to select them and when I enable "Manage VPN-related Apps" nothing happens. Under "Managed Apps" it is blank. I am on Mint 19.2 and Cinnamon 4.2.4, and have Transmission and Qbittorrent installed.
claudiux
claudiux-5 months ago
Hello Andrew, I know this problem. I am preparing the next version of this applet which will solve this issue and use symbolic icons. Regards.
claudiux
claudiux-5 months ago
Hello Andrew, The bug fix is ​​done. The best is to use Spices Update to make sure you download the latest version of vpnLookout.
claudiux
claudiux-5 months ago
Many thanks to Dragone2 for the new Italian translation!
leonzon
leonzon-8 months ago
is there any way to configure for a wireguard vpn? thanks
claudiux
claudiux-8 months ago
I'll test a wireguard vpn and I'll tell you how to do, if it's possible.
claudiux
claudiux-9 months ago
Thanks to @muzena for his translation into Croatian!
claudiux
claudiux-1 year ago
Swedish and Turkish translations have been updated. Thanks to @eson57 and @kelebek333 !
claudiux
claudiux-1 year ago
The version 3.3.1 is now available. Now displaying keyboard and mouse shortcuts in the tooltip (hovering over the icon). "Switch to" (another VPN) events are now registered in the log file. The translations in French, Spanish and Italian, and the .pot file, are updated.
claudiux
claudiux-1 year ago
The version 3.3.0 is now available. When the option "Try to reconnect to VPN when it shuts down incidentally." was checked, the Disconnect button was hidden. As requested by Daniel Upshaw (@groovenectar), a new option "Do not try to reconnect automatically if the VPN has been disconnected by the user", complementary to the previous one, allows the user to voluntarily disconnect the VPN (the disconnect button is shown) and not to try to reconnect it afterwards. I also temporarily disabled the automatic installation of translations, which crashed Cinnamon during the installation of this applet.
Daniel Upshaw
Daniel Upshaw-1 year ago
Really cool! I've been using it for a little while now, but only just learned about the middle-click feature. Nice. I noticed that if I select "Try to reconnect the VPN when it shuts down incidentally," the connection toggle at the bottom disappears from the bottom. I would think that we might still want to start/stop it manually with the toggle. No real problem though, and at least I found out why the toggle disappeared.
claudiux
claudiux-1 year ago
Thank you for your support ! Select "Try to reconnect the VPN when it shuts down incidentally" is the same as selecting the autopilot: the manual command is disabled. I could leave the disconnect button visible, but then disconnecting would cause automatic re-connection to be aborted. Then, it may be necessary to notify the user that re-connection will no longer be automatic. I will think about a solution.
claudiux
claudiux-1 year ago
vpnLookOut@claudiux v3.2.0~20181111 is now available. It provides logging of VPN and VPN-related Apps activity. It has been successfully tested on Linux Mint 19, Fedora 27 and Antergos Linux (Arch Linux).
claudiux
claudiux-1 year ago
The Swedish translation has been updated. Thanks to @eson57 !
claudiux
claudiux-1 year ago
The Turkish translation is now available.
claudiux
claudiux-1 year ago
vpnLookOut@claudiux v3.1.0~20181107 is now available. It improves the VPN-related Apps Management and also the French, Spanish and Italian translations. A Turkish translation is coming soon. (Thanks to @kelebek333 !)
claudiux
claudiux-1 year ago
vpnLookOut@claudiux v3.0.1 compatible with Cinnamon 4.0 is now available.
binkyd
binkyd-1 year ago
Love this app!! However, I now use Cinnamon on Antergos Linux, which is Cinnamon 4.0 Can't wait, please catch up!
claudiux
claudiux-1 year ago
Hi @binkyd ! vpnLookOut@claudiux v3.0.1 compatible with Cinnamon 4.0 is coming ! I tested it on Antergos Linux. It works very well.
claudiux
claudiux-1 year ago
Version 3.0.0 is available. For Cinnamon 3.8 (Linux Mint 19): You can manage VPN-related apps, such as Torrent clients. For each of them, you can decide to stop it when the VPN link becomes inactive, and/or restart it when the VPN link becomes active again. There are some new messages to translate. Thank you for contributing to translate them into your language.
claudiux
claudiux-1 year ago
Version 2.5.2 is here. Some translation files have been updated.
claudiux
claudiux-1 year ago
Version 2.5.1 is here. It adds a keyboard shortcut option to activate / deactivate the last used VPN. The default is <Super>v.
claudiux
claudiux-1 year ago
Version 2.5.0 is here. vpnLookOut becomes multi version. For Cinnamon 3.8, the JavaScript code has been switched to Class Syntax and some bash scripts have been modified for more efficiency.
yochananmarqos
yochananmarqos-1 year ago
FYI: Arch uses a tmpfs /run directory, with /var/run and /var/lock simply existing as symlinks for compatibility. It is also used for /tmp by the default systemd setup and does not require an entry in fstab unless a specific configuration is needed.
claudiux
claudiux-1 year ago
Version 2.4.0 is here. New feature: Connect / Disconnect VPN with a single middle-click on the icon of this applet. Fixes a bug in Cinnamon 3.6: the correct script file permissions are set when starting this applet.
caseyjp11
caseyjp11-1 year ago
This applet fails under Archlinux (Cinnamon 3.8.2): vpnLookOut Applet message: Some packages needed!\nTo complete the installation, please enter and execute the command: \napt update && apt install zenity sox libsox-fmt-mp3 [casey@vipertpad ~]$ zenity and sox are already installed...."libsox-fmt-mp3" isn't found either in the main repositories OR the AUR.) fyi
claudiux
claudiux-1 year ago
Version 2.2.0 is now fully compatible with Archlinux, Fedora and LinuxMint/Ubuntu/Debian.
claudiux
claudiux-1 year ago
I'm working on that issue. Please try the last version 2.1.0. Next version will be compatible with Archlinux, too.
paint-rulz
paint-rulz-2 years ago
Hi, a big thank you for this. I'd worked out how to add vpn to startup (Mint 18.1) but didn't know how any dropout could be monitored ... your applet works perfectly! Great that it starts up the vpn (expressvpn), and ensures it's on 24.7. Much appreciate all your work on this applet. A+++++
claudiux
claudiux-2 years ago
Thank you so much! Glad that this applet meets your expectations.
sem5959
sem5959-2 years ago
Спасибо Вам за вашу работу - апплет протестировал на OpenVPN (Protonmail) на дистрибутиве Debian (Cinnamon) работает пока что корректно даже звук издаёт ! Рекомендую всем кто использует VPN, и не забывайте доустановить звуковые оповещения ( apt install zenity sox libsox-fmt-mp3 ) Респект - Thank you !!!
claudiux
claudiux-2 years ago
Спасибо за ваш комментарий, который побуждает меня продолжать разработку этого апплета! Thank you for your comment that encourages me to continue developing this applet!
claudiux
claudiux-2 years ago
vpnLookOut v2.0.1 is here.
GNU / Linux
GNU / Linux-2 years ago
Still I waited for v2.0.0 а 2.0.1 - Thank you !!!
claudiux
claudiux-2 years ago
vpnLookOut v2.0.0 is here !
GNU / Linux
GNU / Linux-2 years ago
Спасибо за ваш ответ. Ждём версию 2.0.0 .
claudiux
claudiux-2 years ago
Le nom de votre connexion comporte-t-il des espaces ? Si c'est la cas, la connexion/déconnexion n'est pas possible dans la version 1.0.0. J'ai corrigé ce bug dans la version 2.0.0 qui arrivera bientôt, accompagnée de nouvelles fonctionnalités. Does your connection name have spaces? If this is the case, connection / disconnection is not possible in version 1.0.0. I fixed this bug in version 2.0.0 which will be coming soon, with new features. У вашего имени соединения есть пробелы? Если это так, соединение / отключение невозможно в версии 1.0.0. Я исправил эту ошибку в версии 2.0.0, которая скоро появится, с новыми функциями.
GNU / Linux
GNU / Linux-2 years ago
Приходится апплет самому выключать и повторно подключаться.
GNU / Linux
GNU / Linux-2 years ago
Здравствуйте. Задумка Ваша с апплетом хорошая, но при разрыве OpenVPN не подключается.