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

Move configuration from '~/.cache' to '~/.config' #11564

Closed
fonic opened this issue Dec 15, 2024 · 12 comments
Closed

Move configuration from '~/.cache' to '~/.config' #11564

fonic opened this issue Dec 15, 2024 · 12 comments

Comments

@fonic
Copy link
Contributor

fonic commented Dec 15, 2024

Recently, I cleared out ~/.cache to fix an issue related to KDE/Plasma/Qt after a system upgrade. Normally, this shouldn't reset any application configuration, but in the case of KeePassXC, the entire database view configuration (displayed columns, column order etc.) was reset.

I noticed that KeePassXC seems to store parts of its configuration data in ~/.cache/keepassxc/keepassxc.ini. However, data in ~/.cache should by design be expandable and/or applications should be able to regenerate that data when needed.

Therefore, I'd like to ask to move all configuration data to ~/.config.

For details, see:
https://forum.manjaro.org/t/stable-update-2024-12-06-systemd-qt-6-8-1-mesa-gstreamer-wireplumber/171581/58

@phoerious
Copy link
Member

See #9738

@phoerious phoerious closed this as not planned Won't fix, can't repro, duplicate, stale Dec 15, 2024
@droidmonkey
Copy link
Member

droidmonkey commented Dec 15, 2024

I think we need to move the database column state to the roaming config file

@fonic you are free to override both config locations if you want with command line flags or env vars: https://keepassxc.org/docs/KeePassXC_UserGuide#_command_line_options

@fonic
Copy link
Contributor Author

fonic commented Dec 15, 2024

I think we need to move the database column state to the roaming config file

I second that. The entire [GUI] section of ~/.cache/keepassxc/keepassxc.ini should be moved to the main config.

@fonic you are free to override both config locations if you want with command line flags or env vars: https://keepassxc.org/docs/KeePassXC_UserGuide#_command_line_options

Thanks for the tip, I'll try that.

@phoerious
Copy link
Member

The GUI state has been moved out of the main config for a reason. Rather than moving it back, we should move it to $XDG_STATE_HOME instead as suggested in the linked issue. $XDG_CACHE_HOME was the closest we had back then, but not quite the correct location. $XDG_STATE_HOME is made for exactly this use case.

@droidmonkey
Copy link
Member

Ahhhh, this is slated for 2.8.0 release: #9755

@xboxones1
Copy link
Contributor

@droidmonkey Backport this to 2.7.10. I've been building with this patch for about a year now, works great.

@fonic
Copy link
Contributor Author

fonic commented Dec 15, 2024

The GUI state has been moved out of the main config for a reason. Rather than moving it back, we should move it to $XDG_STATE_HOME instead as suggested in the linked issue. $XDG_CACHE_HOME was the closest we had back then, but not quite the correct location. $XDG_STATE_HOME is made for exactly this use case.

Poor choice of words on my part, sorry about that. What I meant with "move to main config" was basically move to folder ~/.config/keepassxc.

If settings have to be kept separately, then why not use something like ~/.config/keepassxc/main.ini + ~/.config/keepassxc/gui.ini? Easy to locate, easy to tell apart, easy to reset, easy to back up, easy to transfer to another machine. Why make things unnecessarily cumbersome/difficult...

@droidmonkey
Copy link
Member

droidmonkey commented Dec 15, 2024

This all came about because some folks backup and sync their settings using git or rsync. I prefer how we do this with portable deployments, keepassxc.ini and keepassxc_local.ini.

I do agree that splitting between two disparate directories is incredibly unnecessary.

@xboxones1 I'm considering backporting

@phoerious
Copy link
Member

phoerious commented Dec 15, 2024

On Windows, this translates to AppData and LocalAppData. Keeping it in separate directories makes it possible to pre-provision configs on multiple machines and enables automatic profile roaming. FDO hasn't fully specified this, but using config and state home are the closest approximation.

@droidmonkey
Copy link
Member

droidmonkey commented Dec 15, 2024

Where this is technically true, the meaning of local and roaming on windows has been severely eroded with one drive and intune being prime tools. Not many large organizations use network shares for user profiles anymore.

@fonic
Copy link
Contributor Author

fonic commented Dec 16, 2024

Should this issue be reopened until there is a consensus on how to proceed?

@phoerious
Copy link
Member

There is a consensus and the PR was merged long ago.

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

4 participants