From 04853a3b8c17712cc7f74c3c405ef47af53151c1 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Fri, 16 Jul 2021 12:34:57 -0400 Subject: daemon: Provide more flexibility for configuring display server There's currently a way to disable wayland, but no way to disable Xorg. We currently prefer wayland if it's not disabled, but have no way to prefer Xorg without disabling wayland entirely. There's currently no way use legacy Xorg support at all if user display server support is enabled at a build time. This commit adds more flexibility to display server selection. It adds two new keys: XorgEnable and and PreferredDisplayServer. XorgEnable=false disables Xorg support entirely on seat 0. PreferredDisplayServer can be set to "wayland", "xorg", "legacy-xorg" or "none" to select which display server is used by default. If it's set to "wayland", it will fall back to "xorg". If it's set to "xorg" it will fall back to "wayland". --- daemon/gdm-launch-environment.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'daemon/gdm-launch-environment.c') diff --git a/daemon/gdm-launch-environment.c b/daemon/gdm-launch-environment.c index 87a1c5ff..14ecfac2 100644 --- a/daemon/gdm-launch-environment.c +++ b/daemon/gdm-launch-environment.c @@ -161,6 +161,7 @@ build_launch_environment (GdmLaunchEnvironment *launch_environment, NULL }; char *system_data_dirs; + g_auto (GStrv) supported_session_types = NULL; int i; /* create a hash table of current environment, then update keys has necessary */ @@ -244,6 +245,14 @@ build_launch_environment (GdmLaunchEnvironment *launch_environment, system_data_dirs)); g_free (system_data_dirs); + g_object_get (launch_environment->priv->session, + "supported-session-types", + &supported_session_types, + NULL); + g_hash_table_insert (hash, + g_strdup ("GDM_SUPPORTED_SESSION_TYPES"), + g_strjoinv (":", supported_session_types)); + return hash; } -- cgit v1.2.1