OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gdm?expand=0&rev=93d0dee44463d064f44e68be15cd8dcc
76 lines
3.5 KiB
Diff
76 lines
3.5 KiB
Diff
Index: daemon/gdm-display-access-file.c
|
|
===================================================================
|
|
--- daemon/gdm-display-access-file.c.orig 2010-03-18 08:27:16.000000000 +1100
|
|
+++ daemon/gdm-display-access-file.c 2010-05-11 07:44:22.000000000 +1000
|
|
@@ -440,11 +440,15 @@ _get_auth_info_for_display (GdmDisplayAc
|
|
if (is_local) {
|
|
char localhost[HOST_NAME_MAX + 1] = "";
|
|
*family = FamilyLocal;
|
|
+#if 0
|
|
if (gethostname (localhost, HOST_NAME_MAX) == 0) {
|
|
*address = g_strdup (localhost);
|
|
} else {
|
|
+#endif
|
|
*address = g_strdup ("localhost");
|
|
+#if 0
|
|
}
|
|
+#endif
|
|
} else {
|
|
*family = FamilyWild;
|
|
gdm_display_get_remote_hostname (display, address, NULL);
|
|
Index: daemon/gdm-session-direct.c
|
|
===================================================================
|
|
--- daemon/gdm-session-direct.c.orig 2010-05-11 07:44:20.000000000 +1000
|
|
+++ daemon/gdm-session-direct.c 2010-05-11 07:44:22.000000000 +1000
|
|
@@ -2075,6 +2075,12 @@ setup_session_environment (GdmSessionDir
|
|
g_getenv ("WINDOWPATH"));
|
|
|
|
|
|
+ if (session->priv->display_is_local) {
|
|
+ gdm_session_direct_set_environment_variable (session,
|
|
+ "XAUTHLOCALHOSTNAME",
|
|
+ "localhost");
|
|
+ }
|
|
+
|
|
/* FIXME: We do this here and in the session worker. We should consolidate
|
|
* somehow.
|
|
*/
|
|
Index: daemon/gdm-slave.c
|
|
===================================================================
|
|
--- daemon/gdm-slave.c.orig 2010-04-27 23:48:54.000000000 +1000
|
|
+++ daemon/gdm-slave.c 2010-05-11 07:44:22.000000000 +1000
|
|
@@ -233,6 +233,10 @@ get_script_environment (GdmSlave *slav
|
|
g_hash_table_insert (hash, g_strdup ("REMOTE_HOST"), g_strdup (slave->priv->display_hostname));
|
|
}
|
|
|
|
+ if (slave->priv->display_is_local) {
|
|
+ g_hash_table_insert (hash, g_strdup ("XAUTHLOCALHOSTNAME"), g_strdup ("localhost"));
|
|
+ }
|
|
+
|
|
/* Runs as root */
|
|
g_hash_table_insert (hash, g_strdup ("XAUTHORITY"), g_strdup (slave->priv->display_x11_authority_file));
|
|
g_hash_table_insert (hash, g_strdup ("DISPLAY"), g_strdup (slave->priv->display_name));
|
|
@@ -481,6 +485,7 @@ gdm_slave_connect_to_x11_display (GdmSla
|
|
|
|
g_setenv ("DISPLAY", slave->priv->display_name, TRUE);
|
|
g_setenv ("XAUTHORITY", slave->priv->display_x11_authority_file, TRUE);
|
|
+ g_setenv ("XAUTHLOCALHOSTNAME", "localhost", TRUE);
|
|
|
|
sigemptyset (&mask);
|
|
sigaddset (&mask, SIGCHLD);
|
|
Index: daemon/gdm-welcome-session.c
|
|
===================================================================
|
|
--- daemon/gdm-welcome-session.c.orig 2010-04-27 03:08:42.000000000 +1000
|
|
+++ daemon/gdm-welcome-session.c 2010-05-11 07:44:22.000000000 +1000
|
|
@@ -420,6 +420,10 @@ get_welcome_environment (GdmWelcomeSessi
|
|
g_hash_table_insert (hash, g_strdup ("SHELL"), g_strdup (pwent->pw_shell));
|
|
}
|
|
|
|
+ if (welcome_session->priv->x11_display_is_local) {
|
|
+ g_hash_table_remove (hash, "XAUTHLOCALHOSTNAME");
|
|
+ g_hash_table_insert (hash, g_strdup ("XAUTHLOCALHOSTNAME"), g_strdup ("localhost"));
|
|
+ }
|
|
|
|
g_hash_table_insert (hash, g_strdup ("PATH"), g_strdup (g_getenv ("PATH")));
|
|
g_hash_table_insert (hash, g_strdup ("WINDOWPATH"), g_strdup (g_getenv ("WINDOWPATH")));
|