[gnome-session/wip/benzea/systemd-user-switch: 7/21] fail-whale: Never show logout button in GDM



commit 304a84471f0bd9cfd8e30b550d9e85dafaddc562
Author: Benjamin Berg <bberg redhat com>
Date:   Sat Apr 20 01:03:43 2019 +0200

    fail-whale: Never show logout button in GDM
    
    Check the RUNNING_UNDER_GDM environment variable and never show the
    logout button if it is set. This allows running the gnome-session-failed
    with --allow-logout always set simplifying the relevant systemd units.

 gnome-session/gsm-fail-whale-dialog.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/gnome-session/gsm-fail-whale-dialog.c b/gnome-session/gsm-fail-whale-dialog.c
index ca64b2e2..e252ab14 100644
--- a/gnome-session/gsm-fail-whale-dialog.c
+++ b/gnome-session/gsm-fail-whale-dialog.c
@@ -386,6 +386,12 @@ int main (int argc, char *argv[])
             return 0;
         }
 
+        /* Force-off allow_logout when running inside GDM, this is needed
+         * because the systemd service always passes --allow-logout
+         */
+        if (g_strcmp0 (g_getenv ("RUNNING_UNDER_GDM"), "true") == 0)
+                allow_logout = FALSE;
+
         fail_dialog = g_object_new (GSM_TYPE_FAIL_WHALE_DIALOG, NULL);
         fail_dialog->priv->debug_mode = debug_mode;
         fail_dialog->priv->allow_logout = allow_logout;


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