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

Follow Freedesktop's XDG base directory specification #51

Open
ItsDrike opened this issue Sep 2, 2021 · 0 comments
Open

Follow Freedesktop's XDG base directory specification #51

ItsDrike opened this issue Sep 2, 2021 · 0 comments

Comments

@ItsDrike
Copy link

ItsDrike commented Sep 2, 2021

For some reason, abduco is one of the applications that still clutters the home directory with session info in ~/.abduco folder. While there is a way to avoid this, by setting $ABDUCO_SOCKET_DIR (mentioned in #7 and pretty well documented on the top of the man page), this still isn't ideal.

Freedesktop's XDG Base Directory spec has been there for a long time, and there is no reason to disregard a well-established and known standard. The folder containing the session info should automatically be placed in one of the standard paths. I'm not entirely familiar with the kind of data stored in this location, however this is the simple description of the standard:

  • $XDG_DATA_HOME: Data that persists between application restarts and is needed for the app to work properly (things like databases)
  • $XDG_CONFIG_HOME: Configuration data that remains mostly static and is usually only read by the application, not directly modified by it.
  • $XDG_CACHE_HOME: Non-essential data that is expected to be removed by the user regularly.
  • $XDG_RUNTIME_DIR: Runtime file objects, such as sockets or named pipes. This directory will be removed once the user logs off.
  • $XDG_STATE_HOME: Data that should persist between application restarts, but it wouldn't be a huge issue if it got removed.

From my simple observations, you should follow the $XDG_RUNTIME_DIR, if this directory isn't available, the standard would be to fall back to /run/user/$UID

This should be made the default behavior since there is no reason to store these files in home whatsoever, it only clutters the directory and even though there is a way to go around it, there is no reason not to avoid following this standard by default. standard by default.

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