Skip to content

Commit

Permalink
run: Unset EGL driver paths
Browse files Browse the repository at this point in the history
Similar to how b8d8d80 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 <[email protected]>
  • Loading branch information
fooishbar authored and smcv committed Apr 24, 2024
1 parent abcc001 commit 0f26610
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions common/flatpak-run.c
Expand Up @@ -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[] = {
Expand Down
4 changes: 4 additions & 0 deletions doc/flatpak-run.xml
Expand Up @@ -108,6 +108,10 @@
<member>GDK_BACKEND</member>
<member>VK_DRIVER_FILES</member>
<member>VK_ICD_FILENAMES</member>
<member>__EGL_EXTERNAL_PLATFORM_CONFIG_DIRS</member>
<member>__EGL_EXTERNAL_PLATFORM_CONFIG_FILENAMES</member>
<member>__EGL_VENDOR_LIBRARY_DIRS</member>
<member>__EGL_VENDOR_LIBRARY_FILENAMES</member>
</simplelist>
<para>
Also several environment variables with the prefix "GST_" that are used by gstreamer
Expand Down

0 comments on commit 0f26610

Please sign in to comment.