Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#69019 - [element-desktop] Autostart launches plain electron

Attached to Project: Community Packages
Opened by James Hogan (jhogan) - Thursday, 17 December 2020, 22:15 GMT
Last edited by Bruno Pagani (ArchangeGabriel) - Sunday, 17 October 2021, 02:20 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Bruno Pagani (ArchangeGabriel)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


The "Start automatically after system login" preference just brings up the Electron window (same as when you just run electron without an app) after login rather than element.

Additional info:
* package version(s): element-desktop-1.7.14-1 element-web-1.7.14-1 electron-10.1.5-1
* link to upstream bug report, if any:

Steps to reproduce:

* Settings, Preferences, General, "Start automatically after system login"
* System logout, login (or check the autostart file mentioned below)

I expect element to start, presumably minimised / in the status bar.
Instead I just get the electron window.

Element is started using KDE, presumably the element-desktop command, which runs:

electron /usr/lib/element/app.asar "$@"

When the option is ticked, it creates ~/.config/autostart/electron.desktop containing:

[Desktop Entry]
Comment=electronstartup script
Exec=/usr/lib/electron/electron --hidden

It appears to be directly caused by the use of a common element between apps in ArchLinux.

See the following comment in the upstream report for a potential solution:
> Yeah, Arch likes to keep one copy of electron instead of all apps bringing their own.
> Judging from your research, a solution from the Arch side would be to patch src/electron-main.js so that the two AutoLaunch constructor's option objects include path: /usr/bin/element-desktop. I don't see a neat way to fix this from the node-auto-launch side.
This task depends upon

Closed by  Bruno Pagani (ArchangeGabriel)
Sunday, 17 October 2021, 02:20 GMT
Reason for closing:  No response
Comment by Bruno Pagani (ArchangeGabriel) - Wednesday, 04 August 2021, 15:24 GMT
Please try 1.7.34, it should be fixed using the patch from linked issue. You need to remove the shortcut and recreate it.