[gdm] server: Only start Xorg with maximum verbosity if debug is enabled
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] server: Only start Xorg with maximum verbosity if debug is enabled
- Date: Fri, 24 Feb 2012 07:07:25 +0000 (UTC)
commit 04a18cc743e075fdcb90a1f1a6e71a02e380c156
Author: Jean Delvare <jdelvare suse de>
Date: Thu Feb 23 16:50:07 2012 +0100
server: Only start Xorg with maximum verbosity if debug is enabled
Only start Xorg with maximum verbosity if gdm itself was started with
debugging enabled. Making Xorg overly verbose by default fills up the
log file with driver debugging messages, hiding the important error or
warning messages.
https://bugzilla.gnome.org/show_bug.cgi?id=670694
https://bugzilla.novell.com/show_bug.cgi?id=748283
https://bugzilla.redhat.com/show_bug.cgi?id=785507
daemon/gdm-server.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c
index 35ccdee..53d7841 100644
--- a/daemon/gdm-server.c
+++ b/daemon/gdm-server.c
@@ -51,6 +51,8 @@
#include "gdm-common.h"
#include "gdm-signal-handler.h"
+#include "gdm-settings-direct.h"
+#include "gdm-settings-keys.h"
#include "gdm-server.h"
@@ -263,11 +265,19 @@ connect_to_parent (GdmServer *server)
static void
gdm_server_init_command (GdmServer *server)
{
+ gboolean debug = FALSE;
+ const char *logverbose;
if (server->priv->command != NULL) {
return;
}
+ gdm_settings_direct_get_boolean (GDM_KEY_DEBUG, &debug);
+ if (debug)
+ logverbose = " -logverbose 7";
+ else
+ logverbose = "";
+
#ifdef WITH_SYSTEMD
/* This is a temporary hack to work around the fact that XOrg
@@ -297,13 +307,13 @@ gdm_server_init_command (GdmServer *server)
goto fallback;
}
- server->priv->command = g_strdup (SYSTEMD_X_SERVER " -br -verbose -logverbose 7");
+ server->priv->command = g_strdup_printf (SYSTEMD_X_SERVER " -br -verbose%s", logverbose);
return;
fallback:
#endif
- server->priv->command = g_strdup (X_SERVER " -br -verbose -logverbose 7");
+ server->priv->command = g_strdup_printf (X_SERVER " -br -verbose%s", logverbose);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]