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 existing thumbnail cache folder #168

Closed
johnandmegh opened this issue Dec 15, 2024 · 4 comments · Fixed by #169
Closed

Use existing thumbnail cache folder #168

johnandmegh opened this issue Dec 15, 2024 · 4 comments · Fixed by #169

Comments

@johnandmegh
Copy link

Hi - is it possible to have the Gwenview Flatpak point at the same location as the user's main thumbnail storage, ~/.cache/thumbnails, so it doesn't have to regenerate new thumbnails for each file/folder with which it's used?

@Erick555
Copy link
Contributor

Erick555 commented Dec 15, 2024

Try flatpak run --filesystem=xdg-cache/thumbnails org.kde.gwenview

In order to make it persistent do flatpak override --user --filesystem=xdg-cache/thumbnails org.kde.gwenview

This digs a hole in the sandbox so it may not be an acceptable default.

@johnandmegh
Copy link
Author

Thanks, that does work on an individual basis - I guess my thought was that this seemed like a desirable default because:

Gwenview already has filesystem=host, so giving it thumbnails folder access seems like it wouldn't make much of a security difference?
It would improve the situation for OSes like the future KDE Linux that depend on Flatpaks for all apps including file management, since it would enable one thumbnail cache to be shared across the different Flatpaks (especially Gwenview and Dolphin?)

I might be misunderstanding part or all of that, apologies for the wasted time if that's the case - but mostly trying to think of what the future state uses will be for this Flatpak, and it seems like a nice efficiency gain to not have to calculate and store multiple copies of the thumbnail cache.

@Erick555
Copy link
Contributor

For apps that have filesystem=host it wouldn't make much difference but having it may not be something desired to be kept over the long run. The future goal should be having meaningful sandbox. Shared thumbnail cache for all apps would mean putting something malicious there will affect all apps at once like there was no sandbox.

travier added a commit that referenced this issue Dec 16, 2024
Grant access to thumbnail cache folder in home directory.
This is safe as Gwenview already has access to everything (host) right
now as it's not fully portal aware yet.

Fixes: #168
@travier
Copy link
Member

travier commented Dec 16, 2024

Sounds like a good idea. Made #169

travier added a commit that referenced this issue Dec 16, 2024
Grant access to thumbnail cache folder in home directory.
This is safe as Gwenview already has access to everything (host) right
now as it's not fully portal aware yet.

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

Successfully merging a pull request may close this issue.

3 participants