flathub / com.tutanota.Tutanota

https://flathub.org/apps/details/com.tutanota.Tutanota
12 stars 10 forks source link

Tutanota Flatpak ignores "run on system startup" setting #20

Open ThracianKnight1907 opened 3 years ago

ThracianKnight1907 commented 3 years ago

Basically the title. Using Tutanota v. 3.77.1 from flathub, and it wont run on startup despite setting it to yes.

TheEvilSkeleton commented 3 years ago

Have you tried updating it? It should be fixed now https://github.com/flathub/com.tutanota.Tutanota/pull/19

ThracianKnight1907 commented 3 years ago

Yes, this is the setting I was referring to: Captură de ecran de la 2020-11-04 19-29-30

TheEvilSkeleton commented 3 years ago

Can you run

cat ~/.local/share/flatpak/exports/share/applications/com.tutanota.Tutanota.desktop 

and send me the output?

ThracianKnight1907 commented 3 years ago

No such file or directory. I don't have the "exports" folder inside ~/.local/share/flatpak/

TheEvilSkeleton commented 3 years ago

Weird, do you know where the .desktop file is located? If so, can you cat it and send me the output?

ThracianKnight1907 commented 3 years ago

There are 2 .desktop files: one in ~/.var/app/com.tutanota.Tutanota/config/autostart:

[Desktop Entry]
    Type=Application
    Version=3.77.1
    Name=tutanota-desktop
    Comment=tutanota-desktop startup script
    Exec=/app/lib/tutanota/tutanota-desktop -a
    StartupNotify=false
    Terminal=false

and one in ~/.var/app/com.tutanota.Tutanota/data/applications

[Desktop Entry]
Name=Tutanota Desktop
Comment=The desktop client for Tutanota, the secure e-mail service.
Exec="/app/lib/tutanota/tutanota-desktop" %U
Terminal=false
Type=Application
Icon=tutanota-desktop.png
StartupWMClass=de.tutao.tutanota-desktop
MimeType=x-scheme-handler/mailto;
Categories=Network;
X-Tutanota-Version=3.77.4
TryExec=/app/lib/tutanota/tutanota-desktop

I also noticed that the flatpak has a desktop integration toggle, that i've set to yes (it asked me on the first run). I don't know if they are related though

TheEvilSkeleton commented 3 years ago

That's really weird. I honestly have no idea where those icon parameters came from. The Exec line should be similar to:

Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=tutanota-desktop --file-forwarding com.tutanota.Tutanota @@u %U @@

You could change the Exec line in your .desktop to the one I've provided, to make it actually work.

Have you tried uninstalling and installing it? That could fix the issue.

In GNOME, you should have a .desktop file located at ~/.local/share/flatpak/exports/share/applications/com.tutanota.Tutanota.desktop, which is symlinked to ~/.local/share/flatpak/app/com.tutanota.Tutanota/current/active/export/share/applications.

ThracianKnight1907 commented 3 years ago

I tried reinstalling and it didn't make a difference. ~I set it to run automatically from Gnome Tweak Tools and it works now.~ EDIT: when adding it to gnome tweaks "run on startup" app list, it starts, but on a maximized window, which isn't the original behaviour. It's useful as workaround in the meantime though

In GNOME, you should have a .desktop file located at ~/.local/share/flatpak/exports/share/applications/com.tutanota.Tutanota.desktop, which is symlinked to ~/.local/share/flatpak/app/com.tutanota.Tutanota/current/active/export/share/applications.

I don't even have these folders

sofiageo commented 3 years ago

My desktop file is located at /var/lib/flatpak/app/com.tutanota.Tutanota/x86_64/stable/4b25f87545ed86066d7a3791276046b846b8f655b2391bc68fd83955ecfe8fb3/export/share/applications

p.s I don't know if I have this issue because I don't have "Run on startup" enabled.

ghost commented 3 years ago

I'm facing the same issue. I'm on Linux Mint 20

Edit: If I add the app in the "Startup Applications" it works but opens the full window which I don't want. I want to behave like the appimage where it runs in the panel at startup.

ghost commented 3 years ago

To make this work Tutanota must create the .desktop file in /home/username/.config/autostart

charlag commented 3 years ago

Please report this against the main Tutanota repo, mentioning that it happens in flatpak only. This repo is not monitored by most of our devs and is related to packaging rather than runtime issues.

mz1193 commented 3 years ago

I tried reinstalling and it didn't make a difference. ~I set it to run automatically from Gnome Tweak Tools and it works now.~ EDIT: when adding it to gnome tweaks "run on startup" app list, it starts, but on a maximized window, which isn't the original behaviour. It's useful as workaround in the meantime though

In GNOME, you should have a .desktop file located at ~/.local/share/flatpak/exports/share/applications/com.tutanota.Tutanota.desktop, which is symlinked to ~/.local/share/flatpak/app/com.tutanota.Tutanota/current/active/export/share/applications.

I don't even have these folders

For anyone having the issue of Tutanota autostarting but not being minimized, simply add -a to the end of the command in your autostart file. For example, mine looks like:

"/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=tutanota-desktop --file-forwarding com.tutanota.Tutanota -a"

BinaryGenius commented 1 year ago

Works flawlessly thank you so much and if anyone wants to add applications to autostart easily just use gnome-tweaks I pressed the plus button to add an app and I could just search for it, very simple to use. Then I went to /home/user/.config/autostart and added the -a argument to the end of the exec command on the tutanota desktop file.