From 3e698c64a831c3fc0d2d043852a6b850109459d7 Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Sun, 22 Oct 2023 14:31:50 -0400 Subject: [PATCH] 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. --- nonguix/multiarch-container.scm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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.