[gnome-session/benzea/lower-warning-in-gdm: 2/2] main: Lower fallback warning when running in GDM
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session/benzea/lower-warning-in-gdm: 2/2] main: Lower fallback warning when running in GDM
- Date: Mon, 15 Nov 2021 14:07:09 +0000 (UTC)
commit 8ad631297b2abd6a39e003c37ee7aab80c3eb53d
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..45ec6597 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]