|
|
f7d48e |
From 99c74360451a85fca9dacad531ed22adbc1b0805 Mon Sep 17 00:00:00 2001
|
|
|
f7d48e |
From: Ray Strode <rstrode@redhat.com>
|
|
|
f7d48e |
Date: Tue, 13 Feb 2018 09:44:50 -0500
|
|
|
f7d48e |
Subject: [PATCH] main: be more aggressive in assuming X11 backend
|
|
|
f7d48e |
|
|
|
f7d48e |
If the session is started by vncserver right now, the
|
|
|
f7d48e |
XDG_SESSION_TYPE won't be X11. Ideally that would be
|
|
|
f7d48e |
fixed, but for backward compatibility we should default
|
|
|
f7d48e |
to X11 if the session type isn't set to wayland explicitly.
|
|
|
f7d48e |
---
|
|
|
f7d48e |
src/core/main.c | 8 +++-----
|
|
|
f7d48e |
1 file changed, 3 insertions(+), 5 deletions(-)
|
|
|
f7d48e |
|
|
|
f7d48e |
diff --git a/src/core/main.c b/src/core/main.c
|
|
|
f7d48e |
index a07dda9ecc..0d241f952b 100644
|
|
|
f7d48e |
--- a/src/core/main.c
|
|
|
f7d48e |
+++ b/src/core/main.c
|
|
|
f7d48e |
@@ -407,7 +407,6 @@ find_session_type (void)
|
|
|
f7d48e |
char *session_id;
|
|
|
f7d48e |
char *session_type;
|
|
|
f7d48e |
const char *session_type_env;
|
|
|
f7d48e |
- gboolean is_tty = FALSE;
|
|
|
f7d48e |
int ret, i;
|
|
|
f7d48e |
|
|
|
f7d48e |
ret = sd_pid_get_session (0, &session_id);
|
|
|
f7d48e |
@@ -420,8 +419,7 @@ find_session_type (void)
|
|
|
f7d48e |
{
|
|
|
f7d48e |
if (session_type_is_supported (session_type))
|
|
|
f7d48e |
goto out;
|
|
|
f7d48e |
- else
|
|
|
f7d48e |
- is_tty = g_strcmp0 (session_type, "tty") == 0;
|
|
|
f7d48e |
+
|
|
|
f7d48e |
free (session_type);
|
|
|
f7d48e |
}
|
|
|
f7d48e |
}
|
|
|
f7d48e |
@@ -453,8 +451,8 @@ find_session_type (void)
|
|
|
f7d48e |
goto out;
|
|
|
f7d48e |
}
|
|
|
f7d48e |
|
|
|
f7d48e |
- /* Legacy support for starting through xinit */
|
|
|
f7d48e |
- if (is_tty && (g_getenv ("MUTTER_DISPLAY") || g_getenv ("DISPLAY")))
|
|
|
f7d48e |
+ /* Legacy support for starting through xinit or vncserver */
|
|
|
f7d48e |
+ if (g_getenv ("MUTTER_DISPLAY") || g_getenv ("DISPLAY"))
|
|
|
f7d48e |
{
|
|
|
f7d48e |
session_type = strdup ("x11");
|
|
|
f7d48e |
goto out;
|
|
|
f7d48e |
--
|
|
|
f7d48e |
2.31.1
|
|
|
f7d48e |
|