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

[flatpak] Problems with save dialog #228

Closed
glaubersm opened this issue Nov 17, 2017 · 5 comments
Closed

[flatpak] Problems with save dialog #228

glaubersm opened this issue Nov 17, 2017 · 5 comments
Milestone

Comments

@glaubersm
Copy link

Hi
I installed peek from flathub.
Compare the save dialogs from peek and firefox.
peek shows two duplicated items in side bar (imagens and videos) and some items are missing (documentos, downloads, música, dados and desktop).
Also I can't save the gif to my home. Peek shows no error but the file is not saved.
I use Arch Linux with Gnome 3.26.2, flatpak 0.10

peek

firefox

@glaubersm glaubersm changed the title [flapak] Problems with save dialog [flatpak] Problems with save dialog Nov 17, 2017
@phw phw added the packaging label Nov 17, 2017
@phw
Copy link
Owner

phw commented Nov 17, 2017

That's due of the sandboxing and limited access to the filesystem. As a quick fix for you run

flatpak --user override --filesystem=home com.uploadedlobster.peek

In the end I am limited to the following choices, all of which currently require some compromises:

  1. The status quo with limited file system access. Good from a sandboxing perspective but unsatisfying for the user.

  2. Giving access to the entire home folder. Better user experience, but it nullifies some of the advantages of the sandbox. But that's probably what I will do.

  3. The best solution would be to use the file chooser portal. That will allow the user to select any location in the file system, and the sandboxed app only gets access to exactly that single file. Downside currently is that the "open in file manager" feature doesn't work well with that (see Add an "open in file manager" portal flatpak/xdg-desktop-portal#95).

Please also note that I have only limited control over the Peek package on flathub. All I can do is opening pull requests on https://github.com/flathub/com.uploadedlobster.peek/ and poking people to act on them. And since I was not good at poking somebody this time the package still was not updated to the latest 1.1.0. Your specific issue was also reported at flathub/com.uploadedlobster.peek#3

For the time being you can also use my own Flatpak repository, see https://github.com/phw/peek#flatpak . I will eventually move the stable builds entirely to flathub, but only once Flathub builds get more automated and I gain more control over it.

@phw phw added this to the 1.2.0 milestone Nov 17, 2017
@glaubersm
Copy link
Author

Thank you fot your detailed post.
Override command works to save files to home, but two problmens remain: it's not possible to save the gif to my ntfs partition and bookmarks ("DADOS" and "Desktop") are not available in side bar.

@phw
Copy link
Owner

phw commented Nov 17, 2017

You can give access to the ntfs partition just with the same --filesystem parameter, just pass the path to your mount point to it (edit: you can pass --filesystem multiple times).

The bookmark thing is really only solvable with using GtkFileChooserNative (option 3 from above). That's actually implemented in Peek, but I build the Flatpak packages without it since it breaks the "open in file browser feature", which is rather essential to me.

@phw
Copy link
Owner

phw commented Nov 17, 2017

I have updated the Flatpak build files and future versions of Peek will come with full access to $HOME by default.

@phw phw closed this as completed Nov 17, 2017
@glaubersm
Copy link
Author

Thank you phw.
Have a nice day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants