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