GNOME Bugzilla – Bug 792406
Always launch Geary service at login
Last modified: 2019-10-24 04:45:44 UTC
Over in Bug 742244 we wanted to remove both the --hidden command line arg and the autostart manager, since the startup-notification pref is both too complicated to explain in a single succinct sentence, doesn't actually do any notification unless three different prefs are enabled, and doesn't work under Flatpak anyway (Bug 789679). To remove this complexity, the pref should just ensure that Geary keeps running when all windows are closed, however there then arises a problem of how to let users launch Geary in the background at login using a tool like GNOME Tweak, and not have it show a MainWindow until the user clicks the Geary icon via the launcher without having to manually edit the command line in the autostart desktop entry - i.e. manually do what the autostart manager does. So the only useful solution seems to be doing what gnome-software does: Install a desktop file in the system-wide autostart so it is always launched on login. The service can then check the value of the pref up front and exit if not true, and users never have to worry about fiddling around with editing desktop entry files. This is optimising for the uncommon case, but I think it's currently the only way to handle autostart in a sane way. If nothing else, at least if DConf is optimised exactly for fast, non-intensive application startups. In the future if something is done about https://wiki.gnome.org/Design/Whiteboards/BackgroundApps, then maybe this situation can be improved a bit.
Closing in favour of https://gitlab.gnome.org/GNOME/geary/issues/604