diff options
author | Corentin Noël <corentin.noel@collabora.com> | 2023-01-28 03:24:26 +0100 |
---|---|---|
committer | Robert Ancell <robert.ancell@gmail.com> | 2023-04-26 16:48:32 +1200 |
commit | 75bf8fb062e3f409d6252449dae631440aa95b72 (patch) | |
tree | ef7a6dc9658c3bfe7a657d7f29bf2e43755383e3 /src/seat-local.c | |
parent | c2ee2b96eeb880ab5b463e8cbef940bcfc0fa661 (diff) | |
download | lightdm-git-75bf8fb062e3f409d6252449dae631440aa95b72.tar.gz |
x-server: Avoid reusing the local X server if the hostname has changed
If the hostname has changed while using a local seat, we will fail to connect and
return to the greeter. Avoid this behavior by recreating the server.
Diffstat (limited to 'src/seat-local.c')
-rw-r--r-- | src/seat-local.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/seat-local.c b/src/seat-local.c index aa6a0b0f..90bb1455 100644 --- a/src/seat-local.c +++ b/src/seat-local.c @@ -175,9 +175,7 @@ create_x_server (SeatLocal *seat) if (command) x_server_local_set_command (x_server, command); - g_autofree gchar *number = g_strdup_printf ("%d", x_server_get_display_number (X_SERVER (x_server))); - g_autoptr(XAuthority) cookie = x_authority_new_local_cookie (number); - x_server_set_authority (X_SERVER (x_server), cookie); + x_server_set_local_authority (X_SERVER (x_server)); const gchar *layout = seat_get_string_property (SEAT (seat), "xserver-layout"); if (layout) |