VPN Look-Out Applet

UUID: vpnLookOut@claudiux
Last edited:
1 month ago 2018-08-22, 04:21 UTC
Last commit: [f2199f1a] vpnLookOut@claudiux: add sv.po (#1929)

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 Transmission 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 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 reconnect when VPN shuts down incidentally, and it can close the Transmission program when VPN shuts down and restart it when VPN restarts.

Status

Fully supported by Author, under continuing development and in continuous use on several machines, running with LinuxMint, 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's misconfigured).

When hovering over or click on the icon, the status of the VPN is displayed with, in parentheses, 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.
  • Try (or don't try) to restart Transmission as soon as VPN restarts.

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 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 (v2.0.0 and following): English, French, Spanish, Italian.

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 very appreciated. 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:

Cinnamon Version 1.8 or higher as it makes comprehensive use of the new Cinnamon Settings Interface for Applets and Desklets. The latest versions have been tested on Cinnamon 3.4.6 and Mint 18.2.

For full facilities including notifications and audible alerts the zenity sox and libsox-fmt-mp3 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
  • Fedora: sudo dnf update && sudo dnf install zenity sox
  • Archlinux: sudo pacman -Syu zenity sox

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

Preconization:

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

You can install Transmission: apt install transmission transmission-gtk

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!

15 Comments

claudiux
claudiux-3 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-4 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-4 months ago
Version 2.2.0 is now fully compatible with Archlinux, Fedora and LinuxMint/Ubuntu/Debian.
claudiux
claudiux-4 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-8 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-8 months ago
Thank you so much! Glad that this applet meets your expectations.
sem5959
sem5959-8 months ago
Спасибо Вам за вашу работу - апплет протестировал на OpenVPN (Protonmail) на дистрибутиве Debian (Cinnamon) работает пока что корректно даже звук издаёт ! Рекомендую всем кто использует VPN, и не забывайте доустановить звуковые оповещения ( apt install zenity sox libsox-fmt-mp3 ) Респект - Thank you !!!
claudiux
claudiux-8 months ago
Спасибо за ваш комментарий, который побуждает меня продолжать разработку этого апплета! Thank you for your comment that encourages me to continue developing this applet!
claudiux
claudiux-8 months ago
vpnLookOut v2.0.1 is here.
GNU / Linux
GNU / Linux-8 months ago
Still I waited for v2.0.0 а 2.0.1 - Thank you !!!
claudiux
claudiux-8 months ago
vpnLookOut v2.0.0 is here !
GNU / Linux
GNU / Linux-8 months ago
Спасибо за ваш ответ. Ждём версию 2.0.0 .
claudiux
claudiux-8 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-8 months ago
Приходится апплет самому выключать и повторно подключаться.
GNU / Linux
GNU / Linux-8 months ago
Здравствуйте. Задумка Ваша с апплетом хорошая, но при разрыве OpenVPN не подключается.