From 8c16ac47c1b88fc48ad8ea621a75a86e028a2764 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 16 Mar 2015 10:57:44 -0400 Subject: [PATCH] wayland: don't let the login screen steal :0 In 3.16, GDM keeps a login screen running on vt1. This login screen starts an Xwayland instance. Since it's the first X server to start, it gets the prized :0 display number. This commit works around that problem, for now, by having GDM's display number start at 1024. https://bugzilla.gnome.org/show_bug.cgi?id=746295 --- src/wayland/meta-xwayland.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c index 6ea437193..468b31bf4 100644 --- a/src/wayland/meta-xwayland.c +++ b/src/wayland/meta-xwayland.c @@ -352,6 +352,13 @@ choose_xdisplay (MetaXWaylandManager *manager) int display = 0; char *lockfile = NULL; + /* Hack to keep the unused Xwayland instance on + * the login screen from taking the prime :0 display + * number. + */ + if (g_getenv ("RUNNING_UNDER_GDM") != NULL) + display = 1024; + do { lockfile = create_lockfile (display, &display);