From 0f2661045d67a2ab7bfe63d382a83ba40fd6be37 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Wed, 24 Apr 2024 11:39:05 +0100 Subject: [PATCH] run: Unset EGL driver paths Similar to how b8d8d80c611c inhibited passthrough of environment variables pointing the Vulkan loader towards a specific ICD, do the same for the EGL paths used by libglvnd to discover the GL driver to use, as well as for NVIDIA's EGLStream shim. These paths are typically referencing the host filesystem; if the user is referencing paths only available in the sandbox, they can use --env or overrides for them. Signed-off-by: Daniel Stone --- common/flatpak-run.c | 4 ++++ doc/flatpak-run.xml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/common/flatpak-run.c b/common/flatpak-run.c index caf0127a7b..4ed002eab2 100644 --- a/common/flatpak-run.c +++ b/common/flatpak-run.c @@ -566,6 +566,10 @@ static const ExportData default_exports[] = { {"GDK_BACKEND", NULL}, {"VK_DRIVER_FILES", NULL}, {"VK_ICD_FILENAMES", NULL}, + {"__EGL_EXTERNAL_PLATFORM_CONFIG_DIRS", NULL}, + {"__EGL_EXTERNAL_PLATFORM_CONFIG_FILENAMES", NULL}, + {"__EGL_VENDOR_LIBRARY_DIRS", NULL}, + {"__EGL_VENDOR_LIBRARY_FILENAMES", NULL}, }; static const ExportData no_ld_so_cache_exports[] = { diff --git a/doc/flatpak-run.xml b/doc/flatpak-run.xml index a63a51be44..b8d840d1b3 100644 --- a/doc/flatpak-run.xml +++ b/doc/flatpak-run.xml @@ -108,6 +108,10 @@ GDK_BACKEND VK_DRIVER_FILES VK_ICD_FILENAMES + __EGL_EXTERNAL_PLATFORM_CONFIG_DIRS + __EGL_EXTERNAL_PLATFORM_CONFIG_FILENAMES + __EGL_VENDOR_LIBRARY_DIRS + __EGL_VENDOR_LIBRARY_FILENAMES Also several environment variables with the prefix "GST_" that are used by gstreamer