[gnome-session/benzea/lower-warning-in-gdm] main: Lower fallback warning when running in GDM




commit 763cbf14b89a8a392a771346a5780649f682838c
Author: Benjamin Berg <bberg redhat com>
Date:   Mon Nov 15 14:56:14 2021 +0100

    main: Lower fallback warning when running in GDM
    
    It is currently expected for the fallback to happen. So hide the errors,
    but still log a single message to inform users about it.

 gnome-session/main.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gnome-session/main.c b/gnome-session/main.c
index 443bc045..3658b5a7 100644
--- a/gnome-session/main.c
+++ b/gnome-session/main.c
@@ -539,7 +539,7 @@ main (int argc, char **argv)
 
 #ifdef HAVE_SYSTEMD
         gsm_util_export_user_environment (&error);
-        if (error) {
+        if (error && !g_getenv (RUNNING_UNDER_GDM)) {
                 g_warning ("Failed to upload environment to systemd: %s", error->message);
                 g_clear_error (&error);
         }
@@ -563,7 +563,7 @@ main (int argc, char **argv)
                  * in a previous session
                  */
                 gsm_util_systemd_reset_failed (&error);
-                if (error) {
+                if (error && !g_getenv (RUNNING_UNDER_GDM)) {
                         g_warning ("Failed to reset failed state of units: %s", error->message);
                         g_clear_error (&error);
                 }
@@ -577,8 +577,11 @@ main (int argc, char **argv)
                 }
 
                 /* We could not start the unit, fall back. */
-                 g_warning ("Falling back to non-systemd startup procedure due to error: %s", 
error->message);
-                 g_clear_error (&error);
+                if (g_getenv (RUNNING_UNDER_GDM))
+                        g_message ("Falling back to non-systemd startup procedure. This is expected to 
happen for GDM sessions.");
+                else
+                        g_warning ("Falling back to non-systemd startup procedure due to error: %s", 
error->message);
+                g_clear_error (&error);
         }
 #endif /* ENABLE_SYSTEMD_SESSION */
 


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