emersion/go-autostart

[Linux] Gnome fails to parse XDG desktop entry

Opened this issue · 1 comments

The package seems to create a desktop file entry in accordance with the XDG specification at the path ~/.config/autostart. However, this file seem defective, as Gnome fails to parse them with the following journal error:

gnome-session-binary[1894]: WARNING: Could not parse desktop file ProtonMail Bridge.desktop or it references a not found TryExec binary

I believe this to be an issue with the double hyphenations in the "Exec" field. I see that you've tried working around the issue by escaping those, but it seems that Gnome fails to parse these properly (I'm guessing it works fine on other desktop environments).

On my system I've managed to apply an ugly hack in the form of:

Exec=sh -c "/usr/lib/protonmail/bridge/protonmail-bridge --no-window"

I'm not sure how presentable this solution is, but I was too lazy to come up with anything nicer.

On my system I've managed to apply an ugly hack in the form of:

Exec=sh -c "/usr/lib/protonmail/bridge/protonmail-bridge --no-window"

I'm not sure how presentable this solution is, but I was too lazy to come up with anything nicer.

If it works, I don't see any problem in this.

What leaves me perplexed is the DE-specific choice of strategy for dealing with autostart. A systemd unit would have been better.

This is what I use:

/usr/lib/systemd/user/protonmail-bridge.service
---
[Unit]
Description=Protonmail Bridge
After=network.target

[Service]
ExecStart=/usr/lib/protonmail/bridge/protonmail-bridge --noninteractive

[Install]
WantedBy=default.target

Then systemctl --user enable protonmail-bridge.