|
|
Log in / Subscribe / Register

Distributors entering Flatpakland

Distributors entering Flatpakland

Posted Jul 9, 2022 13:55 UTC (Sat) by mbunkus (subscriber, #87248)
In reply to: Distributors entering Flatpakland by dowdle
Parent article: Distributors entering Flatpakland

> If this was mentioned in the article or any of the comments at time of writing, I missed it... but Flatpak is only aimed at graphical/desktop applications...

Yep. And it's only really suited for a single main application per Flatpak as it only generates one start menu entry per Flatpak.

You can actually run other binaries contained in the Flatpak, though, both graphical & CLI ones. For example, I offer a Flatpak for my MKVToolNix which consists of five CLI applications & one GUI. The GUI is obviously the main application, but you can run all the others with e.g. "flatpak run org.bunkus.mkvtoolnix-gui mkvmerge --output destination.mkv source.mp4"

The result is that sure, you can have your office program as a Flatpak, but you'll only get a single start menu entry for it, not one for the text processor, one for the spreadsheet etc.

Snaps, on the other hand, can contain multiple binaries, both GUI & CLI, and those are actually made available via standard directories, meaning you can just run them via their usual executable's name.

AppImages are closer to Flatpaks in this regard, though still quite different. AppImages aren't installed: you only download them, grant them the executable bit & run them directly. There is no integration with start menus, MIME systems or anything else, making them highly portable but poorly integrated. One interesting fact about AppImages is that the name you run them as is passed through to the main executable as its program name, allowing you to simply symlink the AppImage file to a name of one of the executables inside it, and then the main executable can decide which executable to actually run based on argv[0]. Definitely not all AppImages do that, though, as you have to provide your own main executable; there isn't a standardized one. (For example: "ln -s MKVToolNix_GUI-68.0.0-x86_64.AppImage mkvmerge ; ./mkvmerge --output destination.mkv source.mp4")

I'm not saying one method is better or worse; just pointing out some of the differences in packaging.


to post comments

Distributors entering Flatpakland

Posted Jul 11, 2022 12:44 UTC (Mon) by abo (subscriber, #77288) [Link] (3 responses)

I don't know how it works, but I've got LibreOffice installed as a Flatpak (from Fedora) and it shows up as multiple applications in GNOME.

Distributors entering Flatpakland

Posted Jul 11, 2022 12:50 UTC (Mon) by mbunkus (subscriber, #87248) [Link] (2 responses)

Interesting. I'd like to know how that works, as the LibreOffice Flatpak build file[1] looks pretty standard (albeit huge): one "command" only, no mention of other desktop entries etc.

[1] https://github.com/flathub/org.libreoffice.LibreOffice/bl...

Distributors entering Flatpakland

Posted Jul 11, 2022 20:55 UTC (Mon) by bartoc (guest, #124262) [Link] (1 responses)

I believe there is a default for when you say "flatpak run", however you can install multiple .desktop files that point to different binaries.

Distributors entering Flatpakland

Posted Jul 11, 2022 21:07 UTC (Mon) by mbunkus (subscriber, #87248) [Link]

Yeah, you're right. The manifest documentation[1] does indeed talk about multiple desktop files per Flatpak. Looks like I assumed "single desktop file" due to the other things (application ID, AppData file, Flatpak icon) only being singular. My bad.

[1] https://docs.flatpak.org/en/latest/conventions.html#deskt...


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds