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




commit 0349a77ad875b78b37700918308fc37b477777ae
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 84df6ce7..a460a849 100644
--- a/gnome-session/main.c
+++ b/gnome-session/main.c
@@ -543,7 +543,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);
         }
@@ -567,7 +567,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);
                 }
@@ -581,8 +581,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]