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

Include sandboxed apps' temporary folders in housekeeping #47

Open
Antolius opened this issue Jan 23, 2022 · 0 comments
Open

Include sandboxed apps' temporary folders in housekeeping #47

Antolius opened this issue Jan 23, 2022 · 0 comments
Labels
Priority: Wishlist Not a priority, but something that might be nice

Comments

@Antolius
Copy link
Member

Problem

Currently SettingsDaemon.Backends.Housekeeping configures systemd-tmpfiles to clean up users' Downloads folder. In addition to old temporary files and trashed files this seemingly covers all locations mentioned in the Housekeeping pannel.

However, with the migration to flatpak most apps now store temporary files in "sandboxed" locations. These typically include either $XDG_RUNTIME_DIR/app/$FLATPAK_ID, which is deleted on app exit, or $XDG_CACHE_HOME/tmp which is not cleaned automatically. This can lead to false sense of security for users who have enabled housekeeping options.

Proposal

The $XDG_CACHE_HOME/tmp location (inside flatpak sandbox) is actually located at ~/.var/app/$FLATPAK_ID/cache/tmp on the host. We could cover these folders with one extra line in the tempfiles config file already created by the settings daemon.

Alternatively, this same feature could be set up by apps that use this particular tmp folder (see this commit for an example). However, this approach has 2 significant drawbacks (that I can think of):

  1. Users would need to trust apps to set up housekeeping for their own tmp directories.
  2. Creating the config file from the app side requires the --filesystem=xdg-config/user-tmpfiles.d permission.

Prior Art (Optional)

I think all other temporary directories are already covered.

@lenemter lenemter added the Priority: Wishlist Not a priority, but something that might be nice label Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Wishlist Not a priority, but something that might be nice
Projects
None yet
Development

No branches or pull requests

2 participants