Hello,
Linux user here. I’ve noticed obsidian isn’t shipped as a flatpak yet, and I think it would be very beneficial for obsidian to consider doing so. The two current available formats are snap and appimage, and they both have issues that flatpak can address:
-
Snap isn’t all that popular or well-supported outside of ubuntu. Even ubuntu derivatives such as xubuntu and linux mint disable snaps by default, because snap is quite an invasive technology in my opinion. Canonical is aggressively pushing those and even went out of their way to change the chromium package to an empty husk that installs the chromium snap to push its adoption.
Flatpak is typically more distribution-agnostic, its adoption isn’t driven by these kinds of practices with questionable ethics, and it has no daemons running in the background after the application has quit. -
Appimage is great for “portable” applications that you can just click and run, but they lack the level of system integration that flatpaks and snaps can provide, such as installing icons and desktop files. Without manually installing icons, the obsidian application in my dock (Gnome) is just blank. It’s also slightly slower (1-2s delay) to launch since the appimage will have to be mounted first. Additionally, because appimage is immutable by design, OTA update isn’t possible (on windows you can just update the asar itself), so the user has to:
- re-download the appimage
- move it to their desired directory
-
chmod +x
on it - finally rename it to make it match their existing desktop file they have manually installed in their home directories
-
Here are the benefits of providing a flatpak package and ship it on flathub:
-
Easier installation and updates. Shipping the flatpak on flathub will enable the users to install the latest version of obsidian with one command (3 commands at most if the user did not have flatpak installed and have flathub added as a repository), with none of the aforementioned annoyances that I previously mentioned about the appimage. If they have a software market type application such as gnome software, they can simply click on install in the GUI. The desktop file and the icons are all properly set up during the installation process, and the user don’t have to do anything after the installation to start using obsidian. Updating is trivial as the user just need to run
flatpak update
or use a compatible GUI frontend such as gnome software, and since delta updates are supported, this will download a similar amount of data (essentially just the asar most of the time) that the windows version would to complete an update.
Here’s a list of distro-specific setup instructions: https://flatpak.org/setup/ - Giving the user better control over Obsidian. Obsidian isn’t open source, even though I trust it with my information, some users might not. Flatpak provides some nice sandboxing capabilities without sacrificing much in terms of usability, and the user can easily customize the sandboxing rules by using a GUI application called Flatseal if they find the defaults not suitable for their use cases. For example, I can totally disable network access, or restrict filesystem access to my home folder only. We wouldn’t even run into these problems because the user can just change the sanboxing rules with an intuitive GUI: [Linux] snap version doesn't allow file access outside home folder
- Flatpak is distribution-agnostic. Unlike snaps, they work equally well on ubuntu (including derivatives) and non-ubuntu derivatives. Flatpak has a runtime concept, which solves the dependency problem like shipping libs inside the appimage does. You can target a runtime with all of the common libs you need, and build your flatpak on top of it. Since this exact runtime is used everywhere across all distributions, it won’t undo the benefit that appimage already provides. This has the obvious disadvantage of incurring a larger initial download, but since the runtimes are reusable across applications, but imho this is an okay trade-off. Users who are not happy with the runtime size can obviously continue to use the appimage.
- Nitpick: both snap and appimage clutter my system mounts, but flatpak does not.
-
Easier installation and updates. Shipping the flatpak on flathub will enable the users to install the latest version of obsidian with one command (3 commands at most if the user did not have flatpak installed and have flathub added as a repository), with none of the aforementioned annoyances that I previously mentioned about the appimage. If they have a software market type application such as gnome software, they can simply click on install in the GUI. The desktop file and the icons are all properly set up during the installation process, and the user don’t have to do anything after the installation to start using obsidian. Updating is trivial as the user just need to run
A friend was kind enough to try building an experimental flatpak with the unpacked appimage, and it runs great: https://gist.github.com/joshua-stone/20e92c9a78f2080b2e9b7edd79c97dc9
There are many other examples available here: https://github.com/flathub/flathub/pulls
Thanks for making Obsidian, and I hope you’ll consider my suggestion.
Additional info:
- The Freedesktop runtime: https://gitlab.com/freedesktop-sdk/freedesktop-sdk
- Elementary has adopted flatpak for AppCenter as well: https://blog.elementary.io/elementary-appcenter-flatpak/
- Here’s an example of how a flatpak application shows up in gnome software:
- Screenshot of Flatseal, there are more options down below: