[gnome-session] main: allow turning on debugging from environment variable



commit 41d7c84c5c6f9c2c3e152664b4adb82bc9d1f078
Author: Ray Strode <rstrode redhat com>
Date:   Wed Dec 17 15:06:24 2014 -0500

    main: allow turning on debugging from environment variable
    
    having to pass --debug is pretty onerous for the user given the
    user doesn't normally run gnome-session directly.
    
    This commit lets users throw GNOME_SESSION_DEBUG=yes into
    /etc/environment

 gnome-session/main.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gnome-session/main.c b/gnome-session/main.c
index d868e8a..ab47e67 100644
--- a/gnome-session/main.c
+++ b/gnome-session/main.c
@@ -257,6 +257,10 @@ main (int argc, char **argv)
         bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
         textdomain (GETTEXT_PACKAGE);
 
+        if (g_getenv ("GNOME_SESSION_DEBUG") != NULL) {
+                debug = rpmatch (g_getenv ("GNOME_SESSION_DEBUG"));
+        }
+
         error = NULL;
         options = g_option_context_new (_(" - the GNOME session manager"));
         g_option_context_add_main_entries (options, entries, GETTEXT_PACKAGE);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]