Help apps better work in the background
Background Apps
I'm glad we are adopting background apps in GNOME, there are many use-cases for them, and I think the direction we are taking with the background apps menu really fits GNOME well as it's simple and uncluttered, while fixing some of the issues on other designs by e.g. allowing you to easily close background apps: background shouldn't mean hidden or inaccessible.
On desktops, background apps are typically implemented via a system tray. While system trays are a mess and I'm glad we got rid of ours, its removal left a void and some valid use-cases for background apps were left unimplemented. All we had to offer to work around the issue was to never close an app's window and to bury it in a virtual desktop.
On mobiles, backgrounds apps are standard and adopting them will help GNOME better fit mobiles, with the extra benefit that they will be familiar to any Android of iOS user.
Expectations
Apps are typically left to run in the background when the user doesn't need to interact with them but they still have work to do indefinitely. You typically also want them to start in the background when you log in. Such tasks typically are synchronizing files, fetching new messages, mails, articles, or podcasts, or even playing sound when the app starts.
The first thing I don't want to do when I start my system is to think about all the applications I need to start just to hide their windows on another virtual desktop and don't interact with, all of that to let them do background work and not to use these windows. Not only is it the definition of shitwork, but my precarious attention may be dragged by something I see on one of these windows. Also, I may accidentally close an app by closing its last window just because I finished interacting with it, while I wanted it to keep working in the background. The background metaphor helps more clearly splitting an app's background tasks from its user interaction.
I know very well the current state isn't by design, and that you all are working to improve the situation, the new designs and portals look great! I'm excited by the direction we are taking and I'm just trying to help that global effort.
I expect a typical background app:
- to automatically start when I log in
- to do so without showing a window
- to automatically start doing the background work I expect from it
- to notify me when relevant
- to let me choose what I want to receive notifications for
- to reveal its window when I activate it from the apps menu, the dash, the background apps menu, a notification, a search result…
- to keep running in the background when I close its last window
- to have an entry in the background apps menu when it's running with no visible window
- to let me close it for good from the background apps menu
- to offer settings to work as a foreground-only app, disabling all the previous features
Of courses these expectations are global and some of them may not make sense for some apps, but I think it's are fairly reasonable generic set of expectations for background apps. These expectations are of course also very personal and hence biased, comments are welcome.
Checking the Current State
Let's see is these expectations are fulfilled. I will test some applications for which I can think of background use-cases and apps which offer some of the expected features.
I will only test apps designed for GNOME, whether they are core, circle, or not. I'm going to exclusively test applications installed from Flathub, with the exception of Software which I think shouldn't be omitted. Because I can't test everything and because I prefer to test only applications I know and use to some extent, the list won't be long and there will be notable omissions like Evolution, Polari, and Rhythmbox. I also won't test SyncthingGTK because it's clearly not designed for GNOME, despite being a good background app candidate. The goal isn't to test the whole GNOME application ecosystem, but only to have a large-enough and relevant-enough set. Feel free to contribute more tests if you want to.
I tested the applications on March 17, 2024, on a Fedora Silverblue 40 prerelease running GNOME 46.beta. I didn't talk to these apps' maintainers, so I don't know if they worked or are working on the features I checked, so my results may soon be deprecated. Also, some of the features may of may not be implemented for design or technical reasons that may of may not be related to the background apps use-case. When the apps offer settings to enable some of the features I expect, I consider they support them, and when some of these features aren't relevant to its design, I will simply omit them.
Test Results
Amberol 0.10.3
It may be odd to start by it because I sorted the apps in alphabetical order, but I actually don't expect Amberol to work as a background application. By design, it doesn't handle your music library and it only plays songs you fed it after starting it. Because of that, it wouldn't make sense for it to automatically start when I log in, especially in the background: it can't do anything without the user's interaction. On top of that, as it's a music player I already have audio feedback of what the application is doing, so I don't need graphical notifications to let me know the app started playing the next song, e.g.
It offers the following setting, which is enabled by default:
- Background Playback
Here is how it matches my expected features set:
- [omitted] automatically starts when I log in
- [omitted] does so without showing a window
- [omitted] automatically starts doing the background work I expect from it
- [omitted] notifies me when relevant
- [omitted] lets me choose what I want to receive notifications for
-
keeps running in the background when I close its last window -
reveals its window when I activate it from the apps menu, the dash, the background apps menu, a notification, a search result… -
has an entry in the background apps menu when it's running with no visible window -
lets me close it for good from the background apps menu -
offers settings to work as a foreground-only app, disabling all the previous features
-
While Amberol isn't what I would call a typical background app, it supports all the background app features relevant to its design.
Blanket 0.6.0
I expect Blanket to start playing background sounds when I start my computer. Because I expect it to do so, I also expect to to keep playing the sounds after I close its window.
It offers the following settings:
- Autostart in background
- Keep playing when closed
After switching them on, here is how it matches my expected features set:
-
automatically starts when I log in -
does so without showing a window
-
-
automatically starts doing the background work I expect from it - [omitted] notifies me when relevant
- [omitted] lets me choose what I want to receive notifications for
-
keeps running in the background when I close its last window -
reveals its window when I activate it from the apps menu, the dash, the background apps menu, a notification, a search result… -
has an entry in the background apps menu when it's running with no visible window -
lets me close it for good from the background apps menu -
offers settings to work as a foreground-only app, disabling all the previous features
-
Its perfect! My only complain is that the name of the settings are confusing, that they are in different menus, and that the sounds only start playing when the app starts if you closed it while they were playing, which is confusing, especially as I set it to autostart because I want it to play the sounds when I log in.
Fractal 6
I expect Fractal to fetch new messages in the background and to notify me when I receive some.
Here is how it matches my expected features set:
-
automatically starts when I log in -
does so without showing a window
-
-
automatically starts doing the background work I expect from it -
notifies me when relevant -
lets me choose what I want to receive notifications for
-
-
keeps running in the background when I close its last window -
reveals its window when I activate it from the apps menu, the dash, the background apps menu, a notification, a search result… -
has an entry in the background apps menu when it's running with no visible window -
lets me close it for good from the background apps menu -
offers settings to work as a foreground-only app, disabling all the previous features
-
Sadly Fractal only works as a foreground application, though running in the background when the app was closed has been discussed.
Geary 44.1
I expect Geary to fetch and send emails in the background.
Here is how it matches my expected features set:
-
automatically starts when I log in -
does so without showing a window
-
-
automatically starts doing the background work I expect from it -
notifies me when relevant -
lets me choose what I want to receive notifications for
-
-
keeps running in the background when I close its last window -
reveals its window when I activate it from the apps menu, the dash, the background apps menu, a notification, a search result… -
has an entry in the background apps menu when it's running with no visible window -
lets me close it for good from the background apps menu -
offers settings to work as a foreground-only app, disabling all the previous features
-
Geary would be a perfect background app, but it doesn't implement the features for that.
Lollypop 1.4.37
I expect Lollypop to play music on login, and to keep playing music in the background.
Lollypop has the following settings:
- Continue playback when closed: Play music in the background
- Restore state on startup: Restore current playback and view
After switching them on, here is how it matches my expected features set:
-
automatically starts when I log in -
does so without showing a window
-
-
automatically starts doing the background work I expect from it -
notifies me when relevant -
lets me choose what I want to receive notifications for
-
-
keeps running in the background when I close its last window -
reveals its window when I activate it from the apps menu, the dash, the background apps menu, a notification, a search result… -
has an entry in the background apps menu when it's running with no visible window -
lets me close it for good from the background apps menu -
offers settings to work as a foreground-only app, disabling all the previous features
-
Lollypop only misses starting in the background on login to be perfect! It could resume the last song as it does now, or maybe it could offer playing some random song.
Newsflash 3.1.6
I expect Newsflash to fetch articles in the background.
Newsflash offers the following settings:
- Run in Background: Fetch updates while the app is closed
- Autostart: Start App on login
- Sync on Startup: Fetch updates when the App is launched
After switching it on, here is how it matches my expected features set:
-
automatically starts when I log in -
does so without showing a window
-
-
automatically starts doing the background work I expect from it -
notifies me when relevant -
lets me choose what I want to receive notifications for
-
-
keeps running in the background when I close its last window -
reveals its window when I activate it from the apps menu, the dash, the background apps menu, a notification, a search result… -
has an entry in the background apps menu when it's running with no visible window -
lets me close it for good from the background apps menu -
offers settings to work as a foreground-only app, disabling all the previous features
-
While Newsflash doesn't offer settings for its notifications, it offers settings for how often it looks for new articles, which in practice serves more or less the same purpose. It could maybe offer muting or delaying notifications for high traffic feeds, but that's definitely not a feature I'm going to request or work on. As is, I think Newsflash works perfectly as a background application.
Podcasts 0.6.1
I expect Podcasts to fetch new podcasts in the background, and maybe to keep playing a podcast when its window is closed.
Here is how it matches my expected features set:
-
automatically starts when I log in -
does so without showing a window
-
-
automatically starts doing the background work I expect from it -
notifies me when relevant -
lets me choose what I want to receive notifications for
-
-
keeps running in the background when I close its last window -
reveals its window when I activate it from the apps menu, the dash, the background apps menu, a notification, a search result… -
has an entry in the background apps menu when it's running with no visible window -
lets me close it for good from the background apps menu -
offers settings to work as a foreground-only app, disabling all the previous features
-
Currently Podcasts doesn't work as a background app at all, though it would make sense for it to do.
Shortwave 3.2.0
Shortwave could implement some features of a background application, e.g. it could start playing some radio in the background when I log in. It could also keep playing the radio after I close its window.
Here is how it matches my expected features set:
-
automatically starts when I log in -
does so without showing a window
-
-
automatically starts doing the background work I expect from it -
notifies me when relevant -
lets me choose what I want to receive notifications for
-
-
keeps running in the background when I close its last window -
reveals its window when I activate it from the apps menu, the dash, the background apps menu, a notification, a search result… -
has an entry in the background apps menu when it's running with no visible window -
lets me close it for good from the background apps menu -
offers settings to work as a foreground-only app, disabling all the previous features
-
As-is, Shortwave isn't a background application at all, though it could become one, it's a matter of design to choose if it wants to support it fully, partially, or to keep not supporting it at all.
Software 46.beta
I expect Software to run installations and updates in the background, and to notify me when long tasks are done of new updates are available if I decided to not have them be installed automatically.
I tested the version that came out-of-the-box with Fedora Silverblue, it's not flatpaked and I have no idea if it receives patches changing its behavior.
Here is how it matches my expected features set:
-
automatically starts when I log in -
does so without showing a window
-
-
automatically starts doing the background work I expect from it -
notifies me when relevant -
lets me choose what I want to receive notifications for
-
-
keeps running in the background when I close its last window -
reveals its window when I activate it from the apps menu, the dash, the background apps menu, a notification, a search result… -
has an entry in the background apps menu when it's running with no visible window -
lets me close it for good from the background apps menu -
offers settings to work as a foreground-only app, disabling all the previous features
-
Sadly as of now, Software isn't really usable flatpaked and the background apps menu relies on apps being sandboxed to work… or does it rely on a portal? I don't know. Regarless, right now this doesn't work. Bummer, it's the only missing feature.
Tuba 0.6.3
I expect Tuba to fetch new messages in the background and to notify me when I receive some.
By default, Tuba works like a regular application, but it has the following switch setting:
- Background work: Receive notifications even when the app is closed
After switching it on, here is how it matches my expected features set:
-
automatically starts when I log in -
does so without showing a window
-
-
automatically starts doing the background work I expect from it -
notifies me when relevant -
lets me choose what I want to receive notifications for
-
-
keeps running in the background when I close its last window -
reveals its window when I activate it from the apps menu, the dash, the background apps menu, a notification, a search result… -
has an entry in the background apps menu when it's running with no visible window -
lets me close it for good from the background apps menu -
offers settings to work as a foreground-only app, disabling all the previous features
-
Sadly Tuba doesn't offer starting in the background, otherwise it would have been a perfect background application.
Conclusion
It's a bit of a mess for the moment, while Software can only work as a background app, other apps which would be perfect background apps don't implement any of the relevant features. Many offer options to enable some of these features, and the phrasing is all over the place.
Maybe there could be an initiative to offer guidelines for app devs to support working as a background apps, followed by an effort to help implementing them where relevant and possible. My goal isn't to force any design on any app devs, I just want us to discuss this issue together, and given all the ongoing work on shell designs and portals, I feel that it's the right time to start working on this.