I’m a user that have no problem at using flatpak ps and flatpak kill to list and kill flatpak apps.
But I have friends that aren’t used to CLI and need an easy way to do these tasks.
Sometimes, they get with Firefox or LibreOffice processes that don’t do go away automatically.
But, without resorting to flatpak ps + flatpak kill, it isn’t so easy to kill these flatpak apps because they fire multiple threads. And it isn’t easy for them to locate and kill manually each of these process using Gnome System Monitor.
In GNOME System Monitor, you can click the Show Dependencies option, which will show a tree of processes instead of a flat list. Stuff in flatpak should be children of flatpak and then bwrap or similar.
I thought there was a Kill Process Tree button, but I can’t seem to find it. At the least, that should make it easier to find all the related processes, and then you can Shift-click to select multiple before Ending/Killing them.
Hi @felipehw , welcome to the community! Please take a look at the introductory posts in the #start-here category if you’ve not had a chance yet.
Just curious: is there a reason flatpak apps need to be killed? Why not just close them normally? Some of them may have options to run in the background, but they should all have a quit/exit style option that stops them completely?
So when you kill a process, it should kill the child processes as well. Like for instance, bubblewrap is used by flatpak and will invariably be present while flatpak apps are running or even just runtimes. Trying to tie those all together would need to be through the PID, so find the app PID and kill all processes with the same PID.
A real use case of yesterday (but this keeps happening with people around me):
My fiancée — a school teacher — was having trouble with a problematic .odt file in LibreOffice flatpak. LibreOffice kept closing and behaving weirdly. She thought, correctly, that some LibreOffice was running despite all LibreOffice windows being closed. So, she tried to locate the process in Gnome System Monitor, but there were too many processes (even the LibreOffice had multiple “lines” representing it). I show her the flatpak ps and flatpak kill. One line per running application. Easy to locate and kill. But, she isn’t a “nerd”, and she always forgets how to do it via CLI (and also is “afraid” of CLI).
Hrm, I guess these are bugs in the libreoffice flatpak that should be reported—but I don’t know where—the repo for the Flatpak would be a start?
One “solution” is to just use the libreoffice package from the repos—that way there’s no flatpak involved and one can just use gnome-system-monitor and other “traditional” tools.
There are certain advantages of using flatpaks—primarily that software that isn’t in Fedora yet (or because its proprietary and never will be) can be installed via FlatHub etc. in a sandbox, but if something is in the repos, you can just use that.
I tend to prefer rpms from the repos because our packaging guidelines are a lot stricter than that of Flathub, and we have a complete QA pipeline for these whereas I’m not sure of what the QA pipeline for FlatHub is. The only Flatpaks I use are for proprietary tools or electron based apps that are hard to package for the repos: Signal/Telegram.
I believe Flatpak will progressively take a bigger role in the average Linux user’s life.
It’s important to offer a top-notch user experience to manage (view/kill) apps that don’t behave well because errors/exceptions happen all the time.
I’m seeing a lot of progress in the Flatpak (and Flathub) landscape in the last few years. Maybe this point (manage ending process) can get solved more easily in the future. But the hint of @qulogic helps to manage this right now
You may also take a moment to review the Fedora Community CoC, colourful metaphors are generally not approved in comments. Yes I spell colour the correct way, Canadian English.
Sorry for the colorful metaphors. English isn’t my first language (Portuguese is). Maybe is “* happens”? I will remove it (this kind of thing has different “weights” in different languages and cultures, we always are learning :D).
If you think there are other colorful metaphors (I don’t perceive any other), feel free to edit these parts or point them to me so that I remove them.
No worries here, I’m not very sensitive about it, see reference to being Canadian. There’s an old Canadian saying. “I went to a fight and a Hockey Game broke out.”
So don’t think you’re causing me any grief, cause I’ve heard all there is to hear in the realm of swearing, and then some. I just didn’t want you to run afoul of the CoC here, there can be all ages around is all.
"s**t happens is an alternative as well.