VPN Look-Out Applet

UUID: vpnLookOut@claudiux
Last edited:
1 day ago 2018-11-18, 12:02 UTC
Last commit: [8b184cf8] vpnLookOut@claudiux: Update sv.po (#2085)

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

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

29 Comments

Daniel Upshaw
Daniel Upshaw-5 days 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-5 days 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-6 days 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 week ago
The Swedish translation has been updated. Thanks to @eson57 !
claudiux
claudiux-1 week ago
The Turkish translation is now available.
claudiux
claudiux-1 week 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 week ago
vpnLookOut@claudiux v3.0.1 compatible with Cinnamon 4.0 is now available.
binkyd
binkyd-2 weeks 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-2 weeks 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-3 weeks 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 month ago
Version 2.5.2 is here. Some translation files have been updated.
claudiux
claudiux-1 month 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 month 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 month 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-5 months 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-6 months 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-5 months ago
Version 2.2.0 is now fully compatible with Archlinux, Fedora and LinuxMint/Ubuntu/Debian.
claudiux
claudiux-6 months 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-9 months 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-9 months ago
Thank you so much! Glad that this applet meets your expectations.
sem5959
sem5959-10 months ago
Спасибо Вам за вашу работу - апплет протестировал на OpenVPN (Protonmail) на дистрибутиве Debian (Cinnamon) работает пока что корректно даже звук издаёт ! Рекомендую всем кто использует VPN, и не забывайте доустановить звуковые оповещения ( apt install zenity sox libsox-fmt-mp3 ) Респект - Thank you !!!
claudiux
claudiux-10 months ago
Спасибо за ваш комментарий, который побуждает меня продолжать разработку этого апплета! Thank you for your comment that encourages me to continue developing this applet!
claudiux
claudiux-10 months ago
vpnLookOut v2.0.1 is here.
GNU / Linux
GNU / Linux-10 months ago
Still I waited for v2.0.0 а 2.0.1 - Thank you !!!
claudiux
claudiux-10 months ago
vpnLookOut v2.0.0 is here !
GNU / Linux
GNU / Linux-10 months ago
Спасибо за ваш ответ. Ждём версию 2.0.0 .
claudiux
claudiux-10 months 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-10 months ago
Приходится апплет самому выключать и повторно подключаться.
GNU / Linux
GNU / Linux-10 months ago
Здравствуйте. Задумка Ваша с апплетом хорошая, но при разрыве OpenVPN не подключается.