summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Kehayias <john.kehayias@protonmail.com>2023-10-22 14:31:50 -0400
committerJohn Kehayias <john.kehayias@protonmail.com>2023-10-22 15:20:49 -0400
commit9e99a4dc6f1070b1119fea07053ec0f121d6ea53 (patch)
tree8c8540c6f50fb2eda713ec710f7574ded5ffeddc
parent2ae2326435f3eb40a0aa8ab0e7d876376796d9da (diff)
nonguix: multiarch-container: Set LD_LIBRARY_PATH (for steam).
Setting $LD_LIBRARY_PATH in the container allows for non-Steam games added to Steam to launch properly with Proton. Otherwise they don't make it to the pressure-vessel container as it seems they start in an environment where the rest of our setup is not active (e.g. game will fail to launch with an error about being unable to load libGL.so.1). * nonguix/multiarch-container.scm (make-container-wrapper): Preserve LD_LIBRARY_PATH and set it.
-rw-r--r--nonguix/multiarch-container.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/nonguix/multiarch-container.scm b/nonguix/multiarch-container.scm
index 8f92e6d..ae04482 100644
--- a/nonguix/multiarch-container.scm
+++ b/nonguix/multiarch-container.scm
@@ -260,6 +260,17 @@ in a sandboxed FHS environment."
"^DISPLAY$"
"^DRI_PRIME$"
"^GDK_SCALE$" ; For UI scaling.
+ ;; For startup of added non-Steam games as it
+ ;; seems they start in an early environment
+ ;; before our additional settings. (Likely
+ ;; this can be removed when rewritten to use
+ ;; --emulate-fhs from upstream.) Note that
+ ;; this is explicitly set below. We could
+ ;; preserve what is set before launching the
+ ;; container, but any such directories would
+ ;; need to be shared with the container as
+ ;; well; this is not needed currently.
+ "^LD_LIBRARY_PATH$"
"^PRESSURE_VESSEL_" ; For pressure vessel options.
"_PROXY$"
"_proxy$"
@@ -320,6 +331,10 @@ in a sandboxed FHS environment."
(args (cdr (command-line)))
(command (if DEBUG '()
`("--" ,run ,@args))))
+ ;; Set this so that e.g. non-Steam games added to Steam will launch
+ ;; properly. It seems otherwise they don't make it to launching
+ ;; Steam's pressure-vessel container (for Proton games).
+ (setenv "LD_LIBRARY_PATH" "/lib64:/lib")
;; By default VDPAU drivers are searched for in libvdpau's store
;; path, so set this path to where the drivers will actually be
;; located in the container.