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
This commit is contained in:
Ray Strode 2015-03-16 10:57:44 -04:00
parent 6880cae3fb
commit 8c16ac47c1

View File

@ -352,6 +352,13 @@ choose_xdisplay (MetaXWaylandManager *manager)
int display = 0; int display = 0;
char *lockfile = NULL; 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 do
{ {
lockfile = create_lockfile (display, &display); lockfile = create_lockfile (display, &display);