diff options
author | Benjamin Berg <bberg@redhat.com> | 2021-11-15 14:56:14 +0100 |
---|---|---|
committer | Ray Strode <halfline@gmail.com> | 2022-01-12 14:19:28 +0000 |
commit | 0349a77ad875b78b37700918308fc37b477777ae (patch) | |
tree | 528c8e50b918683e8e657046fa40fdc3d49cd461 | |
parent | 1abd59271455fd89a40c82b857472f8e9b1a74f9 (diff) | |
download | gnome-session-0349a77ad875b78b37700918308fc37b477777ae.tar.gz |
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.
-rw-r--r-- | gnome-session/main.c | 11 |
1 files 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 */ |