From d0a37cf57173c947b237e0b2baaadb69688cbf8a Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 18 Sep 2013 15:43:24 -0400 Subject: flexiserver: don't open a display The only reason it uses gtk is to show some awful dialogs in the case of failure. Drop that code. Now gdmflexiserver can be run from the command line. --- utils/gdmflexiserver.c | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) (limited to 'utils') diff --git a/utils/gdmflexiserver.c b/utils/gdmflexiserver.c index 3688fa4e..a06abffa 100644 --- a/utils/gdmflexiserver.c +++ b/utils/gdmflexiserver.c @@ -27,7 +27,6 @@ #include #include -#include #include "common/gdm-common.h" @@ -170,8 +169,6 @@ main (int argc, char *argv[]) return 1; } - gtk_init (&argc, &argv); - if (monte_carlo_pi) { calc_pi (); return 0; @@ -185,33 +182,7 @@ main (int argc, char *argv[]) error = NULL; res = gdm_goto_login_session (&error); if (! res) { - GtkWidget *dialog; - char *message; - - if (error != NULL) { - message = g_strdup_printf ("%s", error->message); - g_error_free (error); - } else { - message = g_strdup (""); - } - - dialog = gtk_message_dialog_new (NULL, - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_CLOSE, - "%s", _("Unable to start new display")); - - gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), - "%s", message); - g_free (message); - - gtk_window_set_title (GTK_WINDOW (dialog), ""); - gtk_window_set_icon_name (GTK_WINDOW (dialog), "session-properties"); - gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); - gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14); - - gtk_dialog_run (GTK_DIALOG (dialog)); - gtk_widget_destroy (dialog); + g_printerr ("%s", error->message); } else { maybe_lock_screen (); } -- cgit v1.2.1