Attached: 1 image
My fellow software engineer,
It's the year 2024.
Please store your #Linux #desktop application configurations ONLY in `$XDG_CONFIG_HOME`.
NOT in `$HOME` or other non-standard or obsolete places.
May #FreeDesktop be your guide.
https://www.freedesktop.org/wiki/Specifications/
#Programming #DevOps #SysAdmin
I do. But you might have misunderstood my question. I was not asking for assistance. I was just curious if there are libraries available which allow easy adoption of the XDG specification. I imagine that such abstractions would be useful for multi-platform software and generally to lower the bar for adoption.
Depends on the programming language. In C# for example, there’s an API to get special folder paths that works in all supported environments (Windows, Linux, MacOS, Android, and I think iOS too). On Linux, it includes fallbacks in case the environment variables aren’t set.
Are there abstractions available around the XDG specifications to resolve the proper paths?
What language? Python has PyXDG.
In shell it’s simply
XDG_DATA_HOME="${XDG_DATA_HOME:-"$HOME"/.local/share}" XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-"$HOME"/.config}" etc.
Thanks, I did not know about PyXDG. That was the type of thing I was asking about.
Use the environment variables.
I do. But you might have misunderstood my question. I was not asking for assistance. I was just curious if there are libraries available which allow easy adoption of the XDG specification. I imagine that such abstractions would be useful for multi-platform software and generally to lower the bar for adoption.
Depends on the programming language. In C# for example, there’s an API to get special folder paths that works in all supported environments (Windows, Linux, MacOS, Android, and I think iOS too). On Linux, it includes fallbacks in case the environment variables aren’t set.