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

[Feature request] Improve Flatpak sandbox compatibility #89

Open
AsavarTzeth opened this issue Jan 3, 2020 · 4 comments
Open

[Feature request] Improve Flatpak sandbox compatibility #89

AsavarTzeth opened this issue Jan 3, 2020 · 4 comments

Comments

@AsavarTzeth
Copy link

Is your feature request related to a problem? Please describe.
The Flatpak distribution of the app currently is permitted to access all files in a user's home directory, while Go-For-It! only really requires access to two files.

The FileChooser portal, provided by xdg-desktop-portal only supports saving and opening files, not directories. That is the reason for the current use of --filesystem=home, which grants access to the entire home directory.

Describe the solution you'd like
If the gui used to add a new list were to be re-designed in a way that allows the user to select a todo.txt file, and separately a done.txt file, using GtkFileChooserNative it would be possible to remove --filesystem=home.

Describe alternatives you've considered
I have waited a long time now to see if support for choosing directories would be added to xdg-desktop-portal, but it seems unlikely or it will take a very long time.

Additional context
A benefit of making this change, is that it would go well with #77.
Another benefit/side-effect might be the ability to put your todo.txt and done.txt files in a different directory to the other.
Also, just in case you forgot: I am the one who added the Go-For-It! flatpak on Flathub.

@JMoerman
Copy link
Owner

I am planning to do this, but I'm currently busy with exams and deadlines. Support for more fine grained todo and done files was already requested a while back.

@AsavarTzeth
Copy link
Author

That is completly understandable. I had no intention of adding any pressure.

I just wanted to make sure you had this in mind when you do decide to implement the planned feature.

Again, the important limitation to remember is that this will only work by saving and opening files, not directories.

@JMoerman
Copy link
Owner

In master FileChooserNative is now used when Gtk+-3.0 >= 3.22 is available. Are there any other blockers remaining for removing --filesystem=home?

@AsavarTzeth
Copy link
Author

AsavarTzeth commented Oct 1, 2020

Well the good news is that choosing directories is apparently supported now and the native file chooser does work as expected, even when all direct filesystem access is removed.

I did find one UX blocker though. While it is possible to now use the app without --filesystem=home one can still select "Desktop", "Filesystem" and user home directly, which won't work. Instead things will appear to work fine during that session, but in reality a sandboxed (fake) directory will be used and nothing will persist.

Simply put: When you add a new list you may for example select "Desktop". The following todo.txt file isn't created in the real home but you won't notice unless you looked. Once you close the app all new files in "Desktop" will be lost.

Effectively "Other..." is the only menu item that actually will work.

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