Electron applications are becoming increasingly problematic with plasma

Just a short note, to report that electron applications are becoming increasingly problematic with plasma 6.3. As the applications bump the version of the electron framework they employ, issues have started to appear and become common, such as:

  • multiple copies of the icon in the system tray;
  • system tray icon that on click triggers spurious request for permission as “remote desktop” for input devices

The last one is probably innocuous, but scary as it gives the impression that the applications may watch on your keystrokes. If you have given the permission by “an automatic click”, as it may happen, it is also not that clear on KDE how to revoke it. The application permissions tab on the system stettings is grayed out (at least for me). The workaround, for those who might be interested, is to use the flatpak command with the permissions subcommand to check for the permissions and then permissions-remove. Despite being part of flatpak, this appears not to be flatpak specific.

Just to propose an easy replicable case, I am seeing this with the sleek todo manager, when installing the latest appimage. Vesrions before the electron bump are fine.

The developers say that electron is probably OK as it works on gnome and that the newer version are probably merely triggering KDE bugs. KDE won’t look anymore at reports for issues with KDE 6.3 and 6.4 though.

Just something to consider…

Electron-based apps can be built against one particular version of Electron, and often not strictly updated to work 100% with each new iteration (of Electron) as it’s released. Because of this subtle changes in functionality can arise, potentially leading to incompatibility.

A working example of this in play is prepros-bin (from the AUR) which was built against and still requires Electron 25 to function properly. It seems to work on successive versions – to an extent – but functionality begins degrading rather quickly.

To work around the problem (as older versions of Electron are typically dropped to the AUR) I installed electron25-bin from the AUR.

This workaround “just works”, with some caveats: you need to find out exactly which Electron version would solve this for any given app; and be aware that AUR sourced Electron versions may not remain available, or indeed practical, indefinitely.

More likely it’s Electron Bugs.

1 Like

Plasma 6.5 allows the user to set & revoke application permissions for sandboxed applications such as Flatpaks:

The “Flatpak Permissions” page in System Settings has grown into a more general “Application Permissions” page by additionally letting you configure settings related to the XDG portal system, such as taking screenshots, accepting remote control requests, and more! (David Redondo, link)

On Android apps need special permissions to access certain things like the camera and microphone. When the app tries to access something that needs special permission for the first time you will prompted once and afterwards the permission can be removed again in the app settings.

For sandboxed apps on desktop as done by flatpak or snap for example the situation is similar. Such apps can’t access all systems services, instead they have to through xdg-desktop-portal which will show a dialog where the user can grant permission to the app. Unfortunately we lacked the “configure permissions” part of it which means granted permissions disappear into the void and pre-authorization is not possible.

This changes with Plasma 6.5 which will include a new settings page where you can configure application permissions!

A Note on Non-Sandboxed Apps and X11

For non-sandboxed (“host”) apps only a subset of settings will be shown. The reason is simple: Some portals just forward a request from the application to another service. Denying host apps access to such portals would either have no effect as they are not using the portal in the first place or can always talk to the service directly anyway. However some things such as recording screen contents or sending fake input events always require that these apps use the portal because they are simply not possible through other means so these settings will be shown. On Wayland anyway – on X11 everything can do everything. Even so these settings will also be shown on X11 if you are using an app that uses the portal to do these things.

Did not know, this is very nice news!

1 Like

Indeed. As I just said in another thread (accidental rhyme :face_with_peeking_eye: ):

By the way, I’m using GNOME 49.1 on the Manjaro unstable branch. No issues with Electron applications. I have plenty installed utilizing Electron 34, 35, 36, 37, 38 & 39.