Index: gui/greeter/Makefile.am
===================================================================
--- gui/greeter/Makefile.am	(revision 4543)
+++ gui/greeter/Makefile.am	(working copy)
@@ -16,6 +16,8 @@ INCLUDES = \
 	-DSBINDIR=\""$(sbindir)"\"		 	\
 	-DPIXMAPDIR=\""$(pixmapdir)"\"		 	\
 	$(GUI_CFLAGS)					\
+	$(PANGO_CFLAGS)					\
+	$(PANGOFT_CFLAGS)				\
 	$(GREETER_CFLAGS)
 
 #
Index: daemon/gdmconsolekit.c
===================================================================
--- daemon/gdmconsolekit.c	(revision 4543)
+++ daemon/gdmconsolekit.c	(working copy)
@@ -44,6 +44,7 @@
 							  G_TYPE_INVALID))
 #define CK_TYPE_PARAMETER_LIST (dbus_g_type_get_collection ("GPtrArray", \
 							    CK_TYPE_PARAMETER_STRUCT))
+
 static void
 add_param_int (GPtrArray       *parameters,
 	       const char      *key,
@@ -122,7 +123,7 @@ get_string (DBusGProxy *proxy,
 				 G_TYPE_STRING, str,
 				 G_TYPE_INVALID);
 	if (! res) {
-		g_warning ("%s failed: %s", method, error->message);
+		gdm_error ("%s failed: %s", method, error->message);
 		g_error_free (error);
 	}
 
@@ -172,11 +173,15 @@ unlock_ck_session (const char *user,
 				 &sessions,
 				 G_TYPE_INVALID);
 	if (! res) {
-		g_warning ("Failed to get list of sessions: %s", error->message);
+		gdm_error ("Failed to get list of sessions: %s", error->message);
 		g_error_free (error);
 		goto out;
 	}
 
+	while (g_main_context_pending (NULL)) {
+		g_main_context_iteration (NULL, TRUE);
+	}
+
 	for (i = 0; i < sessions->len; i++) {
 		char	   *ssid;
 		DBusGProxy *session_proxy;
@@ -200,7 +205,7 @@ unlock_ck_session (const char *user,
 							 G_TYPE_INVALID,
 							 G_TYPE_INVALID);
 				if (! res) {
-					g_warning ("Unable to unlock %s: %s", ssid, error->message);
+					gdm_error ("Unable to unlock %s: %s", ssid, error->message);
 					g_error_free (error);
 				}
 			}
@@ -240,6 +245,8 @@ open_ck_session (struct passwd *pwent,
 		return NULL;
 	}
 
+	dbus_connection_set_exit_on_disconnect (dbus_g_connection_get_connection (connection), FALSE);
+
 	proxy = dbus_g_proxy_new_for_name (connection,
 					   CK_NAME,
 					   CK_MANAGER_PATH,
@@ -278,7 +285,7 @@ open_ck_session (struct passwd *pwent,
 				 &cookie,
 				 G_TYPE_INVALID);
 	if (! res) {
-		g_warning ("OpenSession failed: %s", error->message);
+		gdm_error ("OpenSession failed: %s", error->message);
 		g_error_free (error);
 	}
 
@@ -286,6 +293,10 @@ open_ck_session (struct passwd *pwent,
 
 	g_ptr_array_free (parameters, TRUE);
 
+	while (g_main_context_pending (NULL)) {
+		g_main_context_iteration (NULL, TRUE);
+	}
+
 	return cookie;
 }
 
@@ -307,6 +318,8 @@ close_ck_session (const char *cookie)
 		return;
 	}
 
+	dbus_connection_set_exit_on_disconnect (dbus_g_connection_get_connection (connection), FALSE);
+
 	proxy = dbus_g_proxy_new_for_name (connection,
 					   CK_NAME,
 					   CK_MANAGER_PATH,
@@ -324,9 +337,13 @@ close_ck_session (const char *cookie)
 				 G_TYPE_INVALID,
 				 G_TYPE_INVALID);
 	if (! res) {
-		g_warning ("CloseSession failed: %s", error->message);
+		gdm_error ("CloseSession failed: %s", error->message);
 		g_error_free (error);
 	}
 
 	g_object_unref (proxy);
+
+	while (g_main_context_pending (NULL)) {
+		g_main_context_iteration (NULL, TRUE);
+	}
 }
Index: daemon/display.c
===================================================================
--- daemon/display.c	(revision 4543)
+++ daemon/display.c	(working copy)
@@ -305,13 +305,15 @@ gdm_display_manage (GdmDisplay *d)
 	closelog ();
 
 	/* Close everything */
-	gdm_close_all_descriptors (0 /* from */, fds[0] /* except */, slave_fifo_pipe_fd /* except2 */);
+	gdm_close_all_descriptors (3 /* from */, fds[0] /* except */, slave_fifo_pipe_fd /* except2 */);
 
+#if 0
 	/* No error checking here - if it's messed the best response
          * is to ignore & try to continue */
 	gdm_open_dev_null (O_RDONLY); /* open stdin - fd 0 */
 	gdm_open_dev_null (O_RDWR); /* open stdout - fd 1 */
 	gdm_open_dev_null (O_RDWR); /* open stderr - fd 2 */
+#endif
 
 	openlog ("gdm", LOG_PID, LOG_DAEMON);
 
Index: daemon/gdm.c
===================================================================
--- daemon/gdm.c	(revision 4543)
+++ daemon/gdm.c	(working copy)
@@ -493,14 +493,14 @@ deal_with_x_crashes (GdmDisplay *d)
 
 		    closelog ();
 
-		    gdm_close_all_descriptors (0 /* from */, -1 /* except */, -1 /* except2 */);
-
+		    gdm_close_all_descriptors (3 /* from */, -1 /* except */, -1 /* except2 */);
+#if 0
 		    /* No error checking here - if it's messed the best response
 		    * is to ignore & try to continue */
 		    gdm_open_dev_null (O_RDONLY); /* open stdin - fd 0 */
 		    gdm_open_dev_null (O_RDWR); /* open stdout - fd 1 */
 		    gdm_open_dev_null (O_RDWR); /* open stderr - fd 2 */
-
+#endif
 		    argv[0] = gdm_get_value_string (GDM_KEY_X_KEEPS_CRASHING);
 		    argv[1] = NULL;
 
