-
Notifications
You must be signed in to change notification settings - Fork 57
Description
Feature request
Description
Currently, the IVPN GUI defaults to using the X11 window manager because it is based on an old version of the Electron framework. X11 is an unmaintained and insecure project that is being phased out more and more each day. It allows apps to record everything you do on any other app that is using X11, so there is a possibility of an app stealing your IVPN account.
Wayland exists to provide a window manager without those issues, and it comes with a compatibility layer for X11-only apps known as XWayland. However, many users choose to disable XWayland due to the previously mentioned issues with X11. Thankfully, the CLI exists, which will run on Wayland if the user's terminal emulator is already using Wayland. But users may prefer using the GUI because they are not fans of the CLI.
Describe the solution you'd like
Users can decide to modify the .desktop file for the GUI to use Wayland by adding the --ozone-platform flag and setting the value of the flag to either wayland or $XDG_SESSION_TYPE. The $XDG_SESSION_TYPE uses your default window manager, so for systems that use Wayland by default, it will use Wayland, and for environments where Wayland isn't available, it will use X11. I think using $XDG_SESSION_TYPE would be a better choice due to the flexibility it provides.
So the final command to execute by the .desktop file would look something like this if manually configured by the user:
/opt/ivpn/ui/bin/ivpn-ui --ozone-platform=$XDG_SESSION_TYPE
Therefore, a solution would be to make the GUI use the --ozone-platform=$XDG_SESSION_TYPE flag by default, so users can just install the GUI and run it without issues.
In addition to the --ozone-platform flag, the flag --enable-features=UseOzonePlatform,WaylandWindowDecorations can be added if desired or needed for proper functionality.
Describe alternatives you've considered
Alternative 1:
Upgrade to the latest Electron release to use Wayland by default when available.
Alternative 2:
Replace the Electron framework with an alternative, such as Gtk or libcosmic.