From dcd79527a1fe964a735e22e93a0b710ea93e193a Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 7 Feb 2022 00:14:18 +0100 Subject: [PATCH] run: Don't propagate GStreamer variables to the sandbox Trying to run sandboxed GStreamer applications from within jhbuild, for example, would make those applications fail to find their plugins. $ LANG=C flatpak run org.gnome.Totem.Devel ** (totem:2): WARNING **: 19:32:06.406: Element 'gtkglsink' is missing, verify your installation ** (totem:2): WARNING **: 19:32:06.406: Element 'glsinkbin' is missing, verify your installation Don't propagate those GStreamer environment variables to within the sandbox to avoid that problem. See https://gitlab.gnome.org/GNOME/totem/-/issues/504 (cherry picked from commit 4470bf142523e8a9bd6791880a66676225dea555) --- common/flatpak-run.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/flatpak-run.c b/common/flatpak-run.c index b1226728..146c4f87 100644 --- a/common/flatpak-run.c +++ b/common/flatpak-run.c @@ -1698,6 +1698,18 @@ static const ExportData default_exports[] = { {"PERLLIB", NULL}, {"PERL5LIB", NULL}, {"XCURSOR_PATH", NULL}, + {"GST_PLUGIN_PATH_1_0", NULL}, + {"GST_REGISTRY", NULL}, + {"GST_REGISTRY_1_0", NULL}, + {"GST_PLUGIN_PATH", NULL}, + {"GST_PLUGIN_SYSTEM_PATH", NULL}, + {"GST_PLUGIN_SCANNER", NULL}, + {"GST_PLUGIN_SCANNER_1_0", NULL}, + {"GST_PLUGIN_SYSTEM_PATH_1_0", NULL}, + {"GST_PRESET_PATH", NULL}, + {"GST_PTP_HELPER", NULL}, + {"GST_PTP_HELPER_1_0", NULL}, + {"GST_INSTALL_PLUGINS_HELPER", NULL}, }; static const ExportData no_ld_so_cache_exports[] = {