Blame SOURCES/xwayland-xauth-xhost-user.patch

4bb951
From 8e756d48ed31bcacf12b99cbd82fb2052503f51e Mon Sep 17 00:00:00 2001
4bb951
From: Hans de Goede <hdegoede@redhat.com>
4bb951
Date: Tue, 18 Jun 2019 16:12:46 +0200
4bb951
Subject: [PATCH 1/4] xwayland: Generate a Xauth file and pass this to Xwayland
4bb951
 when starting it
4bb951
4bb951
Before this commit, sudo x11-app, e.g. sudo gvim /etc/some-file, fails
4bb951
when running a Wayland session. Where as doing this under a "GNOME on Xorg"
4bb951
session works fine. For a user switching from the Xorg session to the
4bb951
Wayland session, this is regression, which we want to avoid.
4bb951
4bb951
This commit fixes this by creating and passing an xauth file to Xwayland when
4bb951
mutter starts it. Just like gdm or startx pass a xauth file to Xorg when they
4bb951
start Xorg.
4bb951
4bb951
Fixes #643
4bb951
4bb951
https://gitlab.gnome.org/GNOME/mutter/issues/643
4bb951
---
4bb951
 meson.build                        |  1 +
4bb951
 src/meson.build                    |  1 +
4bb951
 src/wayland/meta-wayland-private.h |  1 +
4bb951
 src/wayland/meta-wayland.c         | 11 +++-
4bb951
 src/wayland/meta-xwayland.c        | 81 ++++++++++++++++++++++++++++++
4bb951
 5 files changed, 94 insertions(+), 1 deletion(-)
4bb951
4bb951
diff --git a/meson.build b/meson.build
4bb951
index 8ef592bc58..2a404857ce 100644
4bb951
--- a/meson.build
4bb951
+++ b/meson.build
4bb951
@@ -117,6 +117,7 @@ xrandr_dep = dependency('xrandr', version: xrandr_req)
4bb951
 xcb_randr_dep = dependency('xcb-randr')
4bb951
 xcb_res_dep = dependency('xcb-res')
4bb951
 xinerama_dep = dependency('xinerama')
4bb951
+xau_dep = dependency('xau')
4bb951
 ice_dep = dependency('ice')
4bb951
 atk_dep = dependency('atk', version: atk_req)
4bb951
 libcanberra_dep = dependency('libcanberra', version: libcanberra_req)
4bb951
diff --git a/src/meson.build b/src/meson.build
4bb951
index 7cced8f534..91fe74b99a 100644
4bb951
--- a/src/meson.build
4bb951
+++ b/src/meson.build
4bb951
@@ -101,6 +101,7 @@ if have_x11
4bb951
     x11_xcb_dep,
4bb951
     xcb_randr_dep,
4bb951
     xcb_res_dep,
4bb951
+    xau_dep,
4bb951
   ]
4bb951
 
4bb951
   if have_sm
4bb951
diff --git a/src/wayland/meta-wayland-private.h b/src/wayland/meta-wayland-private.h
4bb951
index 07a71f82b1..5bcb0ea4f9 100644
4bb951
--- a/src/wayland/meta-wayland-private.h
4bb951
+++ b/src/wayland/meta-wayland-private.h
4bb951
@@ -51,6 +51,7 @@ typedef struct
4bb951
   struct wl_client *client;
4bb951
   struct wl_resource *xserver_resource;
4bb951
   char *display_name;
4bb951
+  char *auth_file;
4bb951
 
4bb951
   GCancellable *xserver_died_cancellable;
4bb951
   GSubprocess *proc;
4bb951
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
4bb951
index a593f0a7b7..129da8e20d 100644
4bb951
--- a/src/wayland/meta-wayland.c
4bb951
+++ b/src/wayland/meta-wayland.c
4bb951
@@ -362,6 +362,12 @@ meta_wayland_override_display_name (const char *display_name)
4bb951
   _display_name_override = g_strdup (display_name);
4bb951
 }
4bb951
 
4bb951
+static const char *
4bb951
+meta_wayland_get_xwayland_auth_file (MetaWaylandCompositor *compositor)
4bb951
+{
4bb951
+  return compositor->xwayland_manager.auth_file;
4bb951
+}
4bb951
+
4bb951
 void
4bb951
 meta_wayland_init (void)
4bb951
 {
4bb951
@@ -439,7 +445,10 @@ meta_wayland_init (void)
4bb951
     }
4bb951
 
4bb951
   if (meta_should_autostart_x11_display ())
4bb951
-    set_gnome_env ("DISPLAY", meta_wayland_get_xwayland_display_name (compositor));
4bb951
+    {
4bb951
+      set_gnome_env ("DISPLAY", meta_wayland_get_xwayland_display_name (compositor));
4bb951
+      set_gnome_env ("XAUTHORITY", meta_wayland_get_xwayland_auth_file (compositor));
4bb951
+    }
4bb951
 
4bb951
   set_gnome_env ("WAYLAND_DISPLAY", meta_wayland_get_wayland_display_name (compositor));
4bb951
 }
4bb951
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
4bb951
index f3df9766ee..c883eb3d6f 100644
4bb951
--- a/src/wayland/meta-xwayland.c
4bb951
+++ b/src/wayland/meta-xwayland.c
4bb951
@@ -32,6 +32,9 @@
4bb951
 #include <sys/socket.h>
4bb951
 #include <sys/stat.h>
4bb951
 #include <sys/un.h>
4bb951
+#include <sys/random.h>
4bb951
+#include <unistd.h>
4bb951
+#include <X11/Xauth.h>
4bb951
 
4bb951
 #include "compositor/meta-surface-actor-wayland.h"
4bb951
 #include "meta/main.h"
4bb951
@@ -525,6 +528,75 @@ choose_xdisplay (MetaXWaylandManager *manager)
4bb951
   return TRUE;
4bb951
 }
4bb951
 
4bb951
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (FILE, fclose)
4bb951
+
4bb951
+static gboolean
4bb951
+prepare_auth_file (MetaXWaylandManager *manager)
4bb951
+{
4bb951
+  Xauth auth_entry = { 0 };
4bb951
+  g_autoptr (FILE) fp = NULL;
4bb951
+  char hostname[HOST_NAME_MAX + 1];
4bb951
+  char auth_data[16];
4bb951
+  int fd;
4bb951
+
4bb951
+  manager->auth_file = g_build_filename (g_get_user_runtime_dir (),
4bb951
+                                         ".mutter-Xwaylandauth.XXXXXX",
4bb951
+                                         NULL);
4bb951
+
4bb951
+  if (gethostname (hostname, HOST_NAME_MAX) < 0)
4bb951
+    g_strlcpy (hostname, "localhost", HOST_NAME_MAX);
4bb951
+
4bb951
+  if (getrandom (auth_data, sizeof (auth_data), 0) != sizeof (auth_data))
4bb951
+    {
4bb951
+      g_warning ("Failed to get random data: %s", g_strerror (errno));
4bb951
+      return FALSE;
4bb951
+    }
4bb951
+
4bb951
+  auth_entry.family = FamilyLocal;
4bb951
+  auth_entry.address = hostname;
4bb951
+  auth_entry.address_length = strlen (auth_entry.address);
4bb951
+  auth_entry.name = (char *) "MIT-MAGIC-COOKIE-1";
4bb951
+  auth_entry.name_length = strlen (auth_entry.name);
4bb951
+  auth_entry.data = auth_data;
4bb951
+  auth_entry.data_length = sizeof (auth_data);
4bb951
+
4bb951
+  fd = g_mkstemp (manager->auth_file);
4bb951
+  if (fd < 0)
4bb951
+    {
4bb951
+      g_warning ("Failed to open Xauthority file: %s", g_strerror (errno));
4bb951
+      return FALSE;
4bb951
+    }
4bb951
+
4bb951
+  fp = fdopen (fd, "w+");
4bb951
+  if (!fp)
4bb951
+    {
4bb951
+      g_warning ("Failed to open Xauthority stream: %s", g_strerror (errno));
4bb951
+      close (fd);
4bb951
+      return FALSE;
4bb951
+    }
4bb951
+
4bb951
+  if (!XauWriteAuth (fp, &auth_entry))
4bb951
+    {
4bb951
+      g_warning ("Error writing to Xauthority file: %s", g_strerror (errno));
4bb951
+      return FALSE;
4bb951
+    }
4bb951
+
4bb951
+  auth_entry.family = FamilyWild;
4bb951
+  if (!XauWriteAuth (fp, &auth_entry))
4bb951
+    {
4bb951
+      g_warning ("Error writing to Xauthority file: %s", g_strerror (errno));
4bb951
+      return FALSE;
4bb951
+    }
4bb951
+
4bb951
+  if (fflush (fp) == EOF)
4bb951
+    {
4bb951
+      g_warning ("Error writing to Xauthority file: %s", g_strerror (errno));
4bb951
+      return FALSE;
4bb951
+    }
4bb951
+
4bb951
+  return TRUE;
4bb951
+}
4bb951
+
4bb951
 static void
4bb951
 xserver_finished_init (MetaXWaylandManager *manager)
4bb951
 {
4bb951
@@ -566,6 +638,9 @@ meta_xwayland_start (MetaXWaylandManager *manager,
4bb951
   if (!choose_xdisplay (manager))
4bb951
     goto out;
4bb951
 
4bb951
+  if (!prepare_auth_file (manager))
4bb951
+    goto out;
4bb951
+
4bb951
   /* We want xwayland to be a wayland client so we make a socketpair to setup a
4bb951
    * wayland protocol connection. */
4bb951
   if (socketpair (AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, xwayland_client_fd) < 0)
4bb951
@@ -610,6 +685,7 @@ meta_xwayland_start (MetaXWaylandManager *manager,
4bb951
                                                "-terminate",
4bb951
                                                "-accessx",
4bb951
                                                "-core",
4bb951
+                                               "-auth", manager->auth_file,
4bb951
                                                "-listen", "4",
4bb951
                                                "-listen", "5",
4bb951
                                                "-displayfd", "6",
4bb951
@@ -678,6 +754,11 @@ meta_xwayland_stop (MetaXWaylandManager *manager)
4bb951
   unlink (path);
4bb951
 
4bb951
   g_clear_pointer (&manager->display_name, g_free);
4bb951
+  if (manager->auth_file)
4bb951
+    {
4bb951
+      unlink (manager->auth_file);
4bb951
+      g_clear_pointer (&manager->auth_file, g_free);
4bb951
+    }
4bb951
   if (manager->lock_file)
4bb951
     {
4bb951
       unlink (manager->lock_file);
4bb951
-- 
4bb951
2.31.1
4bb951
4bb951
4bb951
From fdf6969cf89dc9127fc9f4d03d9408e54ccd1b40 Mon Sep 17 00:00:00 2001
4bb951
From: Olivier Fourdan <ofourdan@redhat.com>
4bb951
Date: Mon, 19 Aug 2019 15:36:32 +0200
4bb951
Subject: [PATCH 2/4] xwayland: pass the X11 display
4bb951
4bb951
Pass the X11 display to `meta_xwayland_complete_init()` so that it can
4bb951
be used without poking into GDK.
4bb951
4bb951
https://gitlab.gnome.org/GNOME/mutter/merge_requests/735
4bb951
---
4bb951
 src/wayland/meta-xwayland-private.h | 3 ++-
4bb951
 src/wayland/meta-xwayland.c         | 3 ++-
4bb951
 src/x11/meta-x11-display.c          | 5 ++---
4bb951
 3 files changed, 6 insertions(+), 5 deletions(-)
4bb951
4bb951
diff --git a/src/wayland/meta-xwayland-private.h b/src/wayland/meta-xwayland-private.h
4bb951
index 38874eda3f..abcb09e49b 100644
4bb951
--- a/src/wayland/meta-xwayland-private.h
4bb951
+++ b/src/wayland/meta-xwayland-private.h
4bb951
@@ -29,7 +29,8 @@ meta_xwayland_start (MetaXWaylandManager *manager,
4bb951
                      struct wl_display   *display);
4bb951
 
4bb951
 void
4bb951
-meta_xwayland_complete_init (MetaDisplay *display);
4bb951
+meta_xwayland_complete_init (MetaDisplay *display,
4bb951
+                             Display     *xdisplay);
4bb951
 
4bb951
 void
4bb951
 meta_xwayland_stop (MetaXWaylandManager *manager);
4bb951
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
4bb951
index c883eb3d6f..350626dfdb 100644
4bb951
--- a/src/wayland/meta-xwayland.c
4bb951
+++ b/src/wayland/meta-xwayland.c
4bb951
@@ -727,7 +727,8 @@ on_x11_display_closing (MetaDisplay *display)
4bb951
 
4bb951
 /* To be called right after connecting */
4bb951
 void
4bb951
-meta_xwayland_complete_init (MetaDisplay *display)
4bb951
+meta_xwayland_complete_init (MetaDisplay *display,
4bb951
+                             Display     *xdisplay)
4bb951
 {
4bb951
   /* We install an X IO error handler in addition to the child watch,
4bb951
      because after Xlib connects our child watch may not be called soon
4bb951
diff --git a/src/x11/meta-x11-display.c b/src/x11/meta-x11-display.c
4bb951
index 065ffcdda5..d40dcfa3f8 100644
4bb951
--- a/src/x11/meta-x11-display.c
4bb951
+++ b/src/x11/meta-x11-display.c
4bb951
@@ -1066,14 +1066,13 @@ meta_x11_display_new (MetaDisplay *display, GError **error)
4bb951
 
4bb951
   g_assert (prepared_gdk_display);
4bb951
   gdk_display = g_steal_pointer (&prepared_gdk_display);
4bb951
+  xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display);
4bb951
 
4bb951
 #ifdef HAVE_WAYLAND
4bb951
   if (meta_is_wayland_compositor ())
4bb951
-    meta_xwayland_complete_init (display);
4bb951
+    meta_xwayland_complete_init (display, xdisplay);
4bb951
 #endif
4bb951
 
4bb951
-  xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display);
4bb951
-
4bb951
   if (meta_is_syncing ())
4bb951
     XSynchronize (xdisplay, True);
4bb951
 
4bb951
-- 
4bb951
2.31.1
4bb951
4bb951
4bb951
From 25a0945aa69c479d6356a970b39e6ae42e43c877 Mon Sep 17 00:00:00 2001
4bb951
From: Olivier Fourdan <ofourdan@redhat.com>
4bb951
Date: Mon, 19 Aug 2019 15:48:17 +0200
4bb951
Subject: [PATCH 3/4] xwayland: Use given X11 display for DnD setup
4bb951
4bb951
Use the provided X11 display instead of poking into GDK to get the X11
4bb951
display.
4bb951
4bb951
https://gitlab.gnome.org/GNOME/mutter/merge_requests/735
4bb951
---
4bb951
 src/wayland/meta-xwayland-private.h   |  4 ++--
4bb951
 src/wayland/meta-xwayland-selection.c | 18 +++++++++---------
4bb951
 src/wayland/meta-xwayland.c           |  7 +++++--
4bb951
 3 files changed, 16 insertions(+), 13 deletions(-)
4bb951
4bb951
diff --git a/src/wayland/meta-xwayland-private.h b/src/wayland/meta-xwayland-private.h
4bb951
index abcb09e49b..f562d7c96d 100644
4bb951
--- a/src/wayland/meta-xwayland-private.h
4bb951
+++ b/src/wayland/meta-xwayland-private.h
4bb951
@@ -36,8 +36,8 @@ void
4bb951
 meta_xwayland_stop (MetaXWaylandManager *manager);
4bb951
 
4bb951
 /* wl_data_device/X11 selection interoperation */
4bb951
-void     meta_xwayland_init_selection         (void);
4bb951
-void     meta_xwayland_shutdown_selection     (void);
4bb951
+void     meta_xwayland_init_selection         (Display *xdisplay);
4bb951
+void     meta_xwayland_shutdown_selection     (Display *xdisplay);
4bb951
 gboolean meta_xwayland_selection_handle_event (XEvent *xevent);
4bb951
 
4bb951
 const MetaWaylandDragDestFuncs * meta_xwayland_selection_get_drag_dest_funcs (void);
4bb951
diff --git a/src/wayland/meta-xwayland-selection.c b/src/wayland/meta-xwayland-selection.c
4bb951
index 808f913339..122bb76e1c 100644
4bb951
--- a/src/wayland/meta-xwayland-selection.c
4bb951
+++ b/src/wayland/meta-xwayland-selection.c
4bb951
@@ -353,9 +353,9 @@ xdnd_send_status (MetaXWaylandSelection *selection_data,
4bb951
 }
4bb951
 
4bb951
 static void
4bb951
-meta_xwayland_init_dnd (MetaXWaylandManager *manager)
4bb951
+meta_xwayland_init_dnd (MetaXWaylandManager *manager,
4bb951
+                        Display             *xdisplay)
4bb951
 {
4bb951
-  Display *xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
4bb951
   MetaDndBridge *dnd = &manager->selection_data->dnd;
4bb951
   XSetWindowAttributes attributes;
4bb951
   guint32 i, version = XDND_VERSION;
4bb951
@@ -382,12 +382,12 @@ meta_xwayland_init_dnd (MetaXWaylandManager *manager)
4bb951
 }
4bb951
 
4bb951
 static void
4bb951
-meta_xwayland_shutdown_dnd (MetaXWaylandManager *manager)
4bb951
+meta_xwayland_shutdown_dnd (MetaXWaylandManager *manager,
4bb951
+                            Display             *xdisplay)
4bb951
 {
4bb951
   MetaDndBridge *dnd = &manager->selection_data->dnd;
4bb951
 
4bb951
-  XDestroyWindow (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
4bb951
-                  dnd->dnd_window);
4bb951
+  XDestroyWindow (xdisplay, dnd->dnd_window);
4bb951
   dnd->dnd_window = None;
4bb951
 }
4bb951
 
4bb951
@@ -1755,7 +1755,7 @@ shutdown_selection_bridge (MetaSelectionBridge *selection)
4bb951
 }
4bb951
 
4bb951
 void
4bb951
-meta_xwayland_init_selection (void)
4bb951
+meta_xwayland_init_selection (Display *xdisplay)
4bb951
 {
4bb951
   MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
4bb951
   MetaXWaylandManager *manager = &compositor->xwayland_manager;
4bb951
@@ -1764,7 +1764,7 @@ meta_xwayland_init_selection (void)
4bb951
 
4bb951
   manager->selection_data = g_slice_new0 (MetaXWaylandSelection);
4bb951
 
4bb951
-  meta_xwayland_init_dnd (manager);
4bb951
+  meta_xwayland_init_dnd (manager, xdisplay);
4bb951
   init_selection_bridge (&manager->selection_data->clipboard,
4bb951
                          gdk_x11_get_xatom_by_name ("CLIPBOARD"),
4bb951
                          &compositor->seat->data_device.selection_ownership_signal);
4bb951
@@ -1777,7 +1777,7 @@ meta_xwayland_init_selection (void)
4bb951
 }
4bb951
 
4bb951
 void
4bb951
-meta_xwayland_shutdown_selection (void)
4bb951
+meta_xwayland_shutdown_selection (Display *xdisplay)
4bb951
 {
4bb951
   MetaWaylandCompositor *compositor = meta_wayland_compositor_get_default ();
4bb951
   MetaXWaylandManager *manager = &compositor->xwayland_manager;
4bb951
@@ -1787,7 +1787,7 @@ meta_xwayland_shutdown_selection (void)
4bb951
 
4bb951
   g_clear_object (&selection->clipboard.source);
4bb951
 
4bb951
-  meta_xwayland_shutdown_dnd (manager);
4bb951
+  meta_xwayland_shutdown_dnd (manager, xdisplay);
4bb951
   shutdown_selection_bridge (&selection->clipboard);
4bb951
   shutdown_selection_bridge (&selection->primary);
4bb951
   shutdown_selection_bridge (&selection->dnd.selection);
4bb951
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
4bb951
index 350626dfdb..3236711482 100644
4bb951
--- a/src/wayland/meta-xwayland.c
4bb951
+++ b/src/wayland/meta-xwayland.c
4bb951
@@ -38,6 +38,7 @@
4bb951
 
4bb951
 #include "compositor/meta-surface-actor-wayland.h"
4bb951
 #include "meta/main.h"
4bb951
+#include "meta/meta-x11-display.h"
4bb951
 #include "wayland/meta-wayland-actor-surface.h"
4bb951
 
4bb951
 enum
4bb951
@@ -722,7 +723,9 @@ out:
4bb951
 static void
4bb951
 on_x11_display_closing (MetaDisplay *display)
4bb951
 {
4bb951
-  meta_xwayland_shutdown_selection ();
4bb951
+  Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
4bb951
+
4bb951
+  meta_xwayland_shutdown_selection (xdisplay);
4bb951
 }
4bb951
 
4bb951
 /* To be called right after connecting */
4bb951
@@ -739,7 +742,7 @@ meta_xwayland_complete_init (MetaDisplay *display,
4bb951
 
4bb951
   g_signal_connect (display, "x11-display-closing",
4bb951
                     G_CALLBACK (on_x11_display_closing), NULL);
4bb951
-  meta_xwayland_init_selection ();
4bb951
+  meta_xwayland_init_selection (xdisplay);
4bb951
 }
4bb951
 
4bb951
 void
4bb951
-- 
4bb951
2.31.1
4bb951
4bb951
4bb951
From a398699a53b9cc6efda4aa8abe0e3176bab80e92 Mon Sep 17 00:00:00 2001
4bb951
From: Olivier Fourdan <ofourdan@redhat.com>
4bb951
Date: Mon, 19 Aug 2019 15:50:54 +0200
4bb951
Subject: [PATCH 4/4] xwayland: Add local user to xhost
4bb951
4bb951
With the addition of xauth support (commit a8984a81c), Xwayland would
4bb951
rely only on the provided cookies for authentication.
4bb951
4bb951
As a result, running an Xclient from another VT (hence without the
4bb951
XAUTHORITY environment variable set) would result in an access denied.
4bb951
4bb951
The same on X11 is granted because the local user is automatically
4bb951
granted access to Xserver by the startup scripts.
4bb951
4bb951
Add the local user to xhost at startup on Xwayland so that the user can
4bb951
still run a client by setting the DISPLAY as long as it's the same user
4bb951
on the same host.
4bb951
4bb951
https://gitlab.gnome.org/GNOME/mutter/merge_requests/735
4bb951
---
4bb951
 src/wayland/meta-xwayland.c | 18 ++++++++++++++++++
4bb951
 1 file changed, 18 insertions(+)
4bb951
4bb951
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
4bb951
index 3236711482..275aeb78cb 100644
4bb951
--- a/src/wayland/meta-xwayland.c
4bb951
+++ b/src/wayland/meta-xwayland.c
4bb951
@@ -598,6 +598,23 @@ prepare_auth_file (MetaXWaylandManager *manager)
4bb951
   return TRUE;
4bb951
 }
4bb951
 
4bb951
+static void
4bb951
+add_local_user_to_xhost (Display *xdisplay)
4bb951
+{
4bb951
+  XHostAddress host_entry;
4bb951
+  XServerInterpretedAddress siaddr;
4bb951
+
4bb951
+  siaddr.type = (char *) "localuser";
4bb951
+  siaddr.typelength = strlen (siaddr.type);
4bb951
+  siaddr.value = (char *) g_get_user_name();
4bb951
+  siaddr.valuelength = strlen (siaddr.value);
4bb951
+
4bb951
+  host_entry.family = FamilyServerInterpreted;
4bb951
+  host_entry.address = (char *) &siaddr;
4bb951
+
4bb951
+  XAddHost (xdisplay, &host_entry);
4bb951
+}
4bb951
+
4bb951
 static void
4bb951
 xserver_finished_init (MetaXWaylandManager *manager)
4bb951
 {
4bb951
@@ -743,6 +760,7 @@ meta_xwayland_complete_init (MetaDisplay *display,
4bb951
   g_signal_connect (display, "x11-display-closing",
4bb951
                     G_CALLBACK (on_x11_display_closing), NULL);
4bb951
   meta_xwayland_init_selection (xdisplay);
4bb951
+  add_local_user_to_xhost (xdisplay);
4bb951
 }
4bb951
 
4bb951
 void
4bb951
-- 
4bb951
2.31.1
4bb951