You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.5 KiB
50 lines
1.5 KiB
9 months ago
|
From 18d4fbb1fb641e2b507b3adcd13d231145a01cd6 Mon Sep 17 00:00:00 2001
|
||
|
From: Ray Strode <rstrode@redhat.com>
|
||
|
Date: Tue, 13 Feb 2018 09:44:50 -0500
|
||
|
Subject: [PATCH] main: be more aggressive in assuming X11 backend
|
||
|
|
||
|
If the session is started by vncserver right now, the
|
||
|
XDG_SESSION_TYPE won't be X11. Ideally that would be
|
||
|
fixed, but for backward compatibility we should default
|
||
|
to X11 if the session type isn't set to wayland explicitly.
|
||
|
---
|
||
|
src/core/main.c | 8 +++-----
|
||
|
1 file changed, 3 insertions(+), 5 deletions(-)
|
||
|
|
||
|
diff --git a/src/core/main.c b/src/core/main.c
|
||
|
index 629f8e94e..1e1e13367 100644
|
||
|
--- a/src/core/main.c
|
||
|
+++ b/src/core/main.c
|
||
|
@@ -333,7 +333,6 @@ find_session_type (void)
|
||
|
char *session_id;
|
||
|
char *session_type;
|
||
|
const char *session_type_env;
|
||
|
- gboolean is_tty = FALSE;
|
||
|
int ret, i;
|
||
|
|
||
|
ret = sd_pid_get_session (0, &session_id);
|
||
|
@@ -346,8 +345,7 @@ find_session_type (void)
|
||
|
{
|
||
|
if (session_type_is_supported (session_type))
|
||
|
goto out;
|
||
|
- else
|
||
|
- is_tty = g_strcmp0 (session_type, "tty") == 0;
|
||
|
+
|
||
|
free (session_type);
|
||
|
}
|
||
|
}
|
||
|
@@ -379,8 +377,8 @@ find_session_type (void)
|
||
|
goto out;
|
||
|
}
|
||
|
|
||
|
- /* Legacy support for starting through xinit */
|
||
|
- if (is_tty && (g_getenv ("MUTTER_DISPLAY") || g_getenv ("DISPLAY")))
|
||
|
+ /* Legacy support for starting through xinit or vncserver */
|
||
|
+ if (g_getenv ("MUTTER_DISPLAY") || g_getenv ("DISPLAY"))
|
||
|
{
|
||
|
session_type = strdup ("x11");
|
||
|
goto out;
|
||
|
--
|
||
|
2.21.0
|
||
|
|