static gboolean gdm_display_real_prepare (GdmDisplay *display) { char *command; char *log_file; char *log_path; g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE); g_debug ("GdmDisplay: prepare display"); g_assert (display->priv->slave_proxy == NULL); if (!gdm_display_create_authority (display)) { g_warning ("Unable to set up access control for display %d", display->priv->x11_display_number); return FALSE; } _gdm_display_set_status (display, GDM_DISPLAY_PREPARED); display->priv->slave_proxy = gdm_slave_proxy_new (); g_signal_connect (display->priv->slave_proxy, "exited", G_CALLBACK (slave_exited), display); g_signal_connect (display->priv->slave_proxy, "died", G_CALLBACK (slave_died), display); log_file = g_strdup_printf ("%s-slave.log", display->priv->x11_display_name); log_path = g_build_filename (LOGDIR, log_file, NULL); g_free (log_file); gdm_slave_proxy_set_log_path (display->priv->slave_proxy, log_path); g_free (log_path); command = g_strdup_printf ("%s --display-id %s", display->priv->slave_command, display->priv->id); gdm_slave_proxy_set_command (display->priv->slave_proxy, command); g_free (command); return TRUE; }
static gboolean gdm_xdmcp_display_prepare (GdmDisplay *display) { GdmXdmcpDisplay *self = GDM_XDMCP_DISPLAY (display); GdmLaunchEnvironment *launch_environment; char *display_name; char *seat_id; char *hostname; launch_environment = NULL; display_name = NULL; seat_id = NULL; hostname = NULL; g_object_get (self, "x11-display-name", &display_name, "seat-id", &seat_id, "remote-hostname", &hostname, "launch-environment", &launch_environment, NULL); if (launch_environment == NULL) { launch_environment = gdm_create_greeter_launch_environment (display_name, seat_id, NULL, hostname, FALSE); g_object_set (self, "launch-environment", launch_environment, NULL); g_object_unref (launch_environment); } if (!gdm_display_create_authority (display)) { g_warning ("Unable to set up access control for display %s", display_name); return FALSE; } return GDM_DISPLAY_CLASS (gdm_xdmcp_display_parent_class)->prepare (display); }