-
Notifications
You must be signed in to change notification settings - Fork 306
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
Use XDG_DATA_DIRS instead of hardcoding /usr/share #425
Conversation
1b077c1
to
6d834a8
Compare
Looks like a good overall change! I think the existing |
Yes, I think adding an explicit check for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jmbaur.
Given the changes proposed in #327, we could also update this to the following (assuming that we rebase off those):
// xdgDataDirs finds the paths as specified in the environment variable XDG_DATA_DIRS.
// See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html.
func xdgDataDirs() []string {
if dirs, exists := os.LookupEnv("XDG_DATA_DIRS"); exists && dirs != "" {
return normalizeSearchPaths(dirs)
}
return []string{"/usr/local/share", "/usr/share"}
}
6d834a8
to
424961a
Compare
IMO |
Actually looks like this change can be done now, doesn't seem to be dependent on #327, unless I'm missing something. |
2877f6c
to
ed41ee1
Compare
Changed to use |
ed41ee1
to
a352721
Compare
a352721
to
0308cd1
Compare
When running nvidia-ctk on a system that uses a custom XDG_DATA_DIRS environment variable value, the configuration files for `glvnd`, `vulkan`, and `egl` fail to get passed through from the host to the container. Reading from XDG_DATA_DIRS instead of hardcoding the default value allows for finding said files so they can be mounted in the container. Signed-off-by: Jared Baur <jaredbaur@fastmail.com> Signed-off-by: Evan Lezar <elezar@nvidia.com>
0308cd1
to
5788e62
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this contribution @jmbaur.
When running nvidia-ctk on a system that uses a custom XDG_DATA_DIRS environment variable value, the configuration files for
glvnd
,vulkan
, andegl
fail to get passed through from the host to the container. Reading from XDG_DATA_DIRS instead of hardcoding the default value allows for finding said files so they can be mounted in the container.