-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
Honor the XDG basedir specification #525
Comments
Thanks for the bug report. $XDG_CONFIG_DIRS looks like the variable to use. Could you copy and paste the value of that variable on NixOS, please? I'll test with a similar value on my OS to make sure it solves the problem. |
You want $XDG_CONFIG_DIRS=/etc/xdg:/root/.nix-profile/etc/xdg:/etc/profiles/per-user/root/etc/xdg:/nix/var/nix/profiles/default/etc/xdg:/run/current-system/sw/etc/xdg Note that most of these entries symlink to the same folder and are thus redundant, but this is not necessarily always the case. Furthermore, many applications are wrapped and the wrapper script sets some environment variables. Touchégg for example will probably get an entry pointing to its install location, |
Cool, thanks for the example.
Will the GNOME Shell extension and Touché have the same path in their $XDG_CONFIG_DIRS variable? If not, the issues running them on NixOS will remain. |
Yes but they'll be a lot more manageable. This is a really common problem, so we have tooling to automatically wrap a binary while setting some environment variables. This is way less painful than having to manage a patch set. |
If $XDG_CONFIG_DIRS is set, check if the config is present in one of those directories. Otherwise, fallback to /etc/xdg, as in the spec: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html Finally, fallback to SYSTEM_CONFIG_FILE_PATH for backwards compatibility. Fix #477 and #525
Hi, sorry for the delay fixing this. Here is the fix: #535 Now Touchégg uses both XDG_CONFIG_HOME and XDG_CONFIG_DIRS. |
If $XDG_CONFIG_DIRS is set, check if the config is present in one of those directories. Otherwise, fallback to /etc/xdg, as in the spec: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html Finally, fallback to SYSTEM_CONFIG_FILE_PATH for backwards compatibility. Fix #477 and #525
Is your feature request related to a problem? Please describe
Currently, the search path for potential configuration files is hard-coded.
Describe the solution you'd like
Do an environment variable lookup as described in the XDG base directory specification to determine the appropriate location(s).
Additional context
Related to JoseExposito/gnome-shell-extension-x11gestures#21, and probably supersedes #510.
The text was updated successfully, but these errors were encountered: