2016-09-25 17:30:30 +00:00
|
|
|
Set XAUTHLOCALHOSTNAME to the hostname for local logins to avoid issues in the
|
|
|
|
|
session in case the hostname changes.
|
2013-04-15 08:23:41 +00:00
|
|
|
|
2019-09-18 09:04:31 +00:00
|
|
|
Index: lightdm-1.30.0/src/seat-local.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- lightdm-1.30.0.orig/src/seat-local.c
|
|
|
|
|
+++ lightdm-1.30.0/src/seat-local.c
|
|
|
|
|
@@ -289,6 +289,7 @@ seat_local_run_script (Seat *seat, Displ
|
2018-04-12 19:48:18 +00:00
|
|
|
const gchar *path = x_server_local_get_authority_file_path (X_SERVER_LOCAL (display_server));
|
|
|
|
|
process_set_env (script, "DISPLAY", x_server_get_address (X_SERVER (display_server)));
|
2014-09-17 06:29:28 +00:00
|
|
|
process_set_env (script, "XAUTHORITY", path);
|
|
|
|
|
+ process_set_env (script, "XAUTHLOCALHOSTNAME", g_get_host_name ());
|
|
|
|
|
}
|
2013-04-15 08:23:41 +00:00
|
|
|
|
2016-09-25 17:30:30 +00:00
|
|
|
SEAT_CLASS (seat_local_parent_class)->run_script (seat, display_server, script);
|
2019-09-18 09:04:31 +00:00
|
|
|
Index: lightdm-1.30.0/src/x-authority.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- lightdm-1.30.0.orig/src/x-authority.c
|
|
|
|
|
+++ lightdm-1.30.0/src/x-authority.c
|
2018-04-12 19:48:18 +00:00
|
|
|
@@ -68,8 +68,8 @@ x_authority_new_cookie (guint16 family,
|
2016-09-25 17:30:30 +00:00
|
|
|
XAuthority *
|
|
|
|
|
x_authority_new_local_cookie (const gchar *number)
|
2013-07-23 13:31:24 +00:00
|
|
|
{
|
2016-09-25 17:30:30 +00:00
|
|
|
- gchar hostname[1024];
|
2013-04-15 08:23:41 +00:00
|
|
|
- gethostname (hostname, 1024);
|
2018-04-12 19:48:18 +00:00
|
|
|
+ const gchar *hostname;
|
2014-01-23 20:32:41 +00:00
|
|
|
+ hostname = g_get_host_name ();
|
2016-09-25 17:30:30 +00:00
|
|
|
return x_authority_new_cookie (XAUTH_FAMILY_LOCAL, (guint8 *) hostname, strlen (hostname), number);
|
|
|
|
|
}
|
|
|
|
|
|
2019-09-18 09:04:31 +00:00
|
|
|
Index: lightdm-1.30.0/src/x-server.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- lightdm-1.30.0.orig/src/x-server.c
|
|
|
|
|
+++ lightdm-1.30.0/src/x-server.c
|
2014-01-23 20:32:41 +00:00
|
|
|
@@ -15,6 +15,7 @@
|
2013-09-08 19:47:46 +00:00
|
|
|
|
|
|
|
|
#include "x-server.h"
|
2013-04-15 08:23:41 +00:00
|
|
|
#include "configuration.h"
|
2013-09-08 19:47:46 +00:00
|
|
|
+#include "x-server-local.h"
|
2013-04-15 08:23:41 +00:00
|
|
|
|
2018-10-25 15:07:51 +00:00
|
|
|
typedef struct
|
2014-09-30 07:57:15 +00:00
|
|
|
{
|
2018-10-25 15:07:51 +00:00
|
|
|
@@ -161,6 +162,8 @@ x_server_connect_session (DisplayServer
|
2013-09-08 19:47:46 +00:00
|
|
|
else
|
|
|
|
|
l_debug (session, "Not setting XDG_VTNR");
|
2013-04-15 08:23:41 +00:00
|
|
|
|
2013-09-08 19:47:46 +00:00
|
|
|
+ if (IS_X_SERVER_LOCAL (display_server))
|
2014-01-23 20:32:41 +00:00
|
|
|
+ session_set_env (session, "XAUTHLOCALHOSTNAME", g_get_host_name ());
|
2013-09-08 19:47:46 +00:00
|
|
|
session_set_env (session, "DISPLAY", x_server_get_address (X_SERVER (display_server)));
|
|
|
|
|
session_set_xdisplay (session, x_server_get_address (X_SERVER (display_server)));
|
2013-10-07 10:06:15 +00:00
|
|
|
session_set_remote_host_name (session, x_server_get_hostname (X_SERVER (display_server)));
|