I have package electron38 installed as a dependency of mattermost-desktop.
Mattermost is setup as autostart and session restore is set as its default value of “Restore last saved programs”.
The issue is that at every startup, electron38 is added as autostart and starts up for no reason.
How can I fix this?
System:
Kernel: 6.19.6-1-MANJARO arch: x86_64 bits: 64
Desktop: KDE Plasma v: 6.5.6 Distro: Manjaro Linux
If you have session restore enabled, then it will restore all applications that were previously running. The fact that you also have mattermost-desktop in Autostart means that the system will attempt to start it twice.
Now, the mattermost-desktop application may support running only a single instance if a second instance is triggered — commonly, this is by way of a signal through dbus — but electron itself is not that smart, and will thus simply start a second instance of itself.
Never forget that electron is only a browser rendering engine — specifically, the chromium browser engine — and browsers do allow muliple instances of themselves running in parallel.
I’m surprised because both Discord and Zulip are in the same situation, but don’t seem to launch instances of electron. I imagine that’s because they both package their own version of electron instead of using the system one.
This also wouldn’t explain on its own why electron gets added to autostart automatically also.
Also, Firefox is present in my autostart and only existing instances get restored, no additional new window.
Presuming mattermost-desktop-bin via the AUR, I note that the package has recently been updated (2026-03-03).
AUR sourced applications should generally be rebuilt after a system sync, in any case – perhaps rebuilding / reinstalling (as it’s a binary) mattermost-desktop-bin might make some difference.
Informational:
A reminder that switching to the Unstable branch (closest to Arch Stable) is generally recommended for users of AUR sourced software – beyond that, the AUR is unsupported by Manjaro (or Arch).
I did a bit more experiments, and the “spawns at startup” is the wrong symptom: if I remove electron from autostart, it doesn’t autostart next login, but it does get readded to autostart (thus autostarts the login after). So this is the primary issue to fix.