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

Files in /var/cache/tuigreet should be in /var/lib/tuigreet #162

Open
Rosuavio opened this issue Oct 31, 2024 · 0 comments
Open

Files in /var/cache/tuigreet should be in /var/lib/tuigreet #162

Rosuavio opened this issue Oct 31, 2024 · 0 comments

Comments

@Rosuavio
Copy link

After deleting /var/cache tuigreet does not remember user or user session.

To Reproduce
Steps to reproduce the behavior:

  1. Run tuigreet
  2. Select session
  3. Select user
  4. login
  5. Delete /var/cache
  6. Close session
  7. See tuigreet not defaulting user and user session

Expected behavior
When /var/cache is deleted tuigreet does not forget last selected user and user session.

System information:

  • Distribution: NixOS
  • greetd version: 10.0
  • tuigreet version: 9.0
  • Installation method (from source, package, binary, etc.): nixos config
  • tuigreet command line: --user-menu --remember --remember-user-session --sessions /nix/store/vzv344vy21kc0ws8niqaqcziplyv9c9g-desktops/share/wayland-sessions

Additional context
I know this happens because tuigreet stores the last loged-in user and the users last session in /var/cache/tuigreet (as well as other information). My reasoning for this being a bug is that is is my understanding that /var/cache is intended to be used for programs to cache data that could otherwise be regenerated or restored (source). User selections cannot be regenerated by the tuigreet, but have to be provided by the user to tuigreet.

The I also consider this a bug because my expectation is that I can delete /var/cache manually as the system administrator and expect applications to able to recover any data they need independently (as explained in the same source).

In my systems I use a technique known in the NixOS community from this blog post and the impermanence tool, to erase non-specified system directories on every boot. While

I can simply enable persisting /var/cache/tuigreet but, I think many (if not all) of the files that tuigreet stores in /var/cache/tuigreet should be storied in /var/lib/tuigreet (source).

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

No branches or pull requests

1 participant