From 1e14a1fd30d0f45ceac12ceb2ceb7016ac0dee42 Mon Sep 17 00:00:00 2001 From: Leorize Date: Thu, 1 Dec 2022 05:57:13 +0000 Subject: [PATCH] flatpak-run: unset XKB_CONFIG_ROOT This variable is typically used to configure the use of a custom set of XKB definitions. In those cases, it's mostly meant for the X11 server or Wayland compositor. NixOS is known to employ this variable for their custom XKB layout implementation. When the path it points to is unreachable (due to the sandbox), most GTK+/Qt applications will crash on Wayland. Unsetting this does not seem to negatively impact the use of custom XKB layouts with Flatpak applications. (cherry picked from commit 751ff11d3a219701a678b5780af532e5e7c15720) --- common/flatpak-run.c | 1 + doc/flatpak-run.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/common/flatpak-run.c b/common/flatpak-run.c index 293c7413..a76690f6 100644 --- a/common/flatpak-run.c +++ b/common/flatpak-run.c @@ -1897,6 +1897,7 @@ static const ExportData default_exports[] = { {"GST_PTP_HELPER_1_0", NULL}, {"GST_INSTALL_PLUGINS_HELPER", NULL}, {"KRB5CCNAME", NULL}, + {"XKB_CONFIG_ROOT", NULL}, }; static const ExportData no_ld_so_cache_exports[] = { diff --git a/doc/flatpak-run.xml b/doc/flatpak-run.xml index 215dd900..0814b2b6 100644 --- a/doc/flatpak-run.xml +++ b/doc/flatpak-run.xml @@ -101,6 +101,7 @@ PERL5LIB XCURSOR_PATH KRB5CCNAME + XKB_CONFIG_ROOT Also several environment variables with the prefix "GST_" that are used by gstreamer