python-eduvpn-client icon indicating copy to clipboard operation
python-eduvpn-client copied to clipboard

Disconnect vpn on app close

Open jwijenbergh opened this issue 2 years ago • 4 comments

Should the VPN disconnect on app close? Related to #517

This is so that the client calls /disconnect to the server on app close. Which saves IP resources on the server, but maybe not ideal behaviour?

jwijenbergh avatar Mar 06 '23 15:03 jwijenbergh

I suggest closing with an active connection should 'minimize' the app to a tray/status icon. That is what happens on other OSes and for a background task like a VPN I do not really want to have a window open all the time or cluttering my taskbar with a regularly minimized app.

Lukas-UAUX avatar Mar 09 '23 10:03 Lukas-UAUX

I agree, the main problem is the lack of a unified tray API. But StatusNotifier is probably good enough to implement. This is something i have been meaning to pick up

See #352

jwijenbergh avatar Mar 09 '23 10:03 jwijenbergh

There are a few situation, the focus so far in the replies here is on only the first one:

  1. The user closes the application using the [X];
  2. The users logs out
  3. The user shuts down the system

Perhaps (2) and (3) are actually the same from the app's point of view, but they should definitely disconnect the VPN.

As for (1), I think it depends on the OS. If you are using GNOME, closing the app should disconnect, if you run on KDE (and KDE actually has a tray?) it could minimize to tray.

In either case, the current behavior is weird, because you "lose" the UI and can't find it anymore, except by restarting the app.

So short term, until tray stuff is implemented, a "quit" of the application, either directly by user, or by logout or by shutdown should disconnect the VPN.

ghost avatar Sep 25 '23 15:09 ghost

Other option: as long as the VPN is active, do not allow the user to close the window using the [X].

This can be revisited on desktops that have a tray (and minimize to tray is implemented), or there is another way to re-open the app from status/tray/whatever area without having to start the app from scratch.

ghost avatar Sep 25 '23 15:09 ghost

I am closing this issue, I don't see anything actionable here. Regarding system tray, I have put it on very low priority for now as the APIs for it suck to say the least

jwijenbergh avatar Jun 05 '24 13:06 jwijenbergh