Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Flatpak portals for file handling #3377

Open
2 tasks done
Jacalz opened this issue Nov 5, 2022 · 1 comment
Open
2 tasks done

Use Flatpak portals for file handling #3377

Jacalz opened this issue Nov 5, 2022 · 1 comment
Labels
enhancement New feature or request OS:Linux Tickets affecting only Linux

Comments

@Jacalz
Copy link
Member

Jacalz commented Nov 5, 2022

Checklist

  • I have searched the issue tracker for open issues that relate to the same feature, before opening a new one.
  • This issue only relates to a single feature. I will open new issues for any other features.

Is your feature request related to a problem?

Fyne applications, like https://beta.flathub.org/apps/details/io.github.jacalz.rymdport, running in Flatpak containers currently require the developers to allow a few XDG-directories to be enabled for the file and folder dialogs to work. Any other directories that the application needs access to will require those directories to be added as well.

It would be better to instead use the Flatpak portals (over DBus presumably) to open OS file dialogs that then let the user select a file or folder that the application then will get access to.

Is it possible to construct a solution with the existing API?

Yes. We need to make sure that the file and folder dialogs open the corresponding Flatpak portals for selecting or creating files/folders. The code for URI and storage code might also need to be adapted to handle this correctly.

Describe the solution you'd like to see.

I don't know if this has been done using Go before but seems, per https://libportal.org/libportal.html, like this should be doable over Dbus. Worst case, we need to create an optional CGo wrapper around https://github.com/flatpak/libportal.

Using go build -tags flatpak might be required to solve this.

@Jacalz Jacalz added enhancement New feature or request OS:Linux Tickets affecting only Linux labels Nov 5, 2022
@Bluebugs
Copy link
Contributor

Bluebugs commented Nov 5, 2022

I think that the support for flatpak call for making a libportal in go. Dbus and go isn't that difficult and it would fit well in helping the go ecosystem on Linux. I think we should have a fyne-io/flatpak-portal module for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request OS:Linux Tickets affecting only Linux
Projects
None yet
Development

No branches or pull requests

2 participants