summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2013-09-18 15:43:24 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2014-02-07 10:42:22 -0500
commitd0a37cf57173c947b237e0b2baaadb69688cbf8a (patch)
tree9f2901e7ca64923ad818efcceb1e8a740e9cc74a
parent08554c6c57d1dd2a15ba15f3cb3d671ea089a886 (diff)
downloadgdm-d0a37cf57173c947b237e0b2baaadb69688cbf8a.tar.gz
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.
-rw-r--r--utils/gdmflexiserver.c31
1 files changed, 1 insertions, 30 deletions
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 <locale.h>
#include <glib/gi18n.h>
-#include <gtk/gtk.h>
#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 ();
}