Linux packaging: ship as flatpak on flathub

I thought I’d let the Flatpak prove me wrong and installed it.

On the 0.9.4 flatpak build, I can’t delete folders. Anybody else seeing this problem?

1 Like

@justdanyul There are some potential causes of this behavior. Electron apparently has some questionable ways of handling trash across different desktops. I don’t believe it’s a flatpak issue per se, more like the concept of “system trash” isn’t well-defined on Linux and projects like Electron have to hack their own implementations around it, which then might not even behave as expected when run in an environment that has strict permissions checks like in the case of flatpak.

This particular bug can at least be worked around – set Deleted files to Move to Obsidian trash (.trash folder) like so:

The Obsidian devs may eventually add a global option for default trash behavior, but in the meantime I’ve written a workaround that runs every time Obsidian launches.

All you need to do to update and restart Obsidian:

$ flatpak update md.obsidian.Obsidian --assumeyes
$ flatpak run md.obsidian.Obsidian 

I hope that helps!

2 Likes

I’ll start an informal bug tracker here just to keep notes on fixed and current flatpak-specific bugs. The bugs are listed in chronological order. If you see frequent updates to this flatpak, this is why. Flatpak uses delta updates so only a tiny bit of data is downloaded on these bugfix updates.

Current:

Fixed:

  • Audio recorder plugin reports “No microphone is connected” commit

    • PulseAudio access is now allowed by default
  • Cannot access files on removable drives commit

    • The sandbox is now configured to allow access to /mnt, /media and /run/media by default.
  • Trash doesn’t work commit

    • Workaround has been added to automatically set trash behavior to use the local .trash folder instead of system trash. Obsidian doesn’t have a global trash preference so we check each vault on startup and set the trash behavior to local. If you have created a new vault, please either go to Settings -> File -> Deleted files and set this to “Move to Obsidian trash”, or simply restart Obsidian.
  • “Open in default app” and “Show in folder” options in the context menu doesn’t work commit

    • Electron relies on xdg-open for these operations, the xdg-utils in the current freedesktop runtime is way too old and doesn’t contain necessary bugfixes required to make this work. The latest version of flatpak-xdg-utils is now bundled as a workaround.
2 Likes

image

Can anyone help? I have no idea what I am doing but as you can see from the screenshot I am trying to get this going. I have a 32bit Chromebook ACER (new)

I have followed the instructions from flatpak but doesn’t seem to work.

Many thanks

Chris

@Chris789 You have to make sure flatpak is installed and Flathub is configured for your system before you can install Obsidian. The official ChromeOS instructions are found here:

Or more concisely,

$ sudo apt install flatpak
$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
$ flatpak install md.obsidian.Obsidian

Let me know if you need any more help!

@htuy @jstone Does it make sense to keep the full thread here? Or should we split the “bug tracker” onto a separate topic?

@argentum I think it’d be sensible to put the bug tracker into its own thread when the original request – “Linux packaging: ship as flatpak on flathub” – has been fulfilled, and more bugs will inevitably be reported.

1 Like

Thank you for this, I never liked appimages. :slight_smile: