You are not logged in.

#1 2024-05-08 06:18:32

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 893

[Solved] Electron keeps autostarting

Since some days I'm facing a nasty little issue: at DE start (Plasma Wayland), an Electron instance is automatically started. The file `~/.config/autostart/electron.desktop` keeps being recreated after I delete it every time, and I've not been able to understand what creates it. What can I do to stop this once and for all?

Last edited by snack (2024-05-08 10:38:10)

Offline

#2 2024-05-08 06:24:48

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 893

Re: [Solved] Electron keeps autostarting

Immediately after posting I found the culprit. The `.desktop` file is create by Mattermost at startup. The `mattermost-desktop` executable is a simple bash script that launches the electron app as follows:
```
#!/bin/sh
exec electron28 /usr/lib/mattermost-desktop/app.asar --disable-dev-mode "$@"
```
So I tried to simply run `electron28`, with and without the `--disable-dev-mode` option, but this does not create the `.desktop` file. So I'm stuck again.

Offline

#3 2024-05-08 07:44:54

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,878

Re: [Solved] Electron keeps autostarting

if mattermost insists on creating an autostart entry that you don't want
a) file a bug against mattermost (assuming that's not somehow option w/ a checkbox in the GUI)
b)

rm ~/.config/autostart/electron.desktop # get rid of the actual autostart
touch ~/.config/autostart/electron.desktop # cretate a file to block the space
sudo chattr +i ~/.config/autostart/electron.desktop # tell mattermost to gfy

Offline

#4 2024-05-08 07:51:34

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 893

Re: [Solved] Electron keeps autostarting

Thanks Seth, I'll file the bug. By the way, Mattermost is really nasty: b) results in

Application: Mattermost 5.7.0 [commit: 5.7.0
]
Platform: Linux 6.8.9-arch1-1 x64
Error: EPERM: operation not permitted, open '/home/mori/.config/autostart/electron.desktop'

and the app crashes.

Offline

#5 2024-05-08 10:33:30

progandy
Member
Registered: 2012-05-17
Posts: 5,306

Re: [Solved] Electron keeps autostarting


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#6 2024-05-08 10:37:57

snack
Member
From: Italy
Registered: 2009-01-13
Posts: 893

Re: [Solved] Electron keeps autostarting

That did the trick, thank you. I was mislead by the fact that what was actually autostarting was not Mattermost but a vanilla Electron window.

Offline

#7 2024-05-08 10:50:50

progandy
Member
Registered: 2012-05-17
Posts: 5,306

Re: [Solved] Electron keeps autostarting

snack wrote:

That did the trick, thank you. I was mislead by the fact that what was actually autostarting was not Mattermost but a vanilla Electron window.

Probably another problem caused by electron unbundling and using system electron. Many electron functions / packages are not developed with that in mind and might have subtle issues like this.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

Board footer

Powered by FluxBB