summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2017-09-21 09:50:00 -0400
committerRay Strode <rstrode@redhat.com>2017-09-21 09:50:58 -0400
commit10418ea982f91f62a5052177578de2ecc3597317 (patch)
tree76e56d9cbfc6e4b2fbeea4ef1fba0c1c3717c995
parent86292092211ccce84b3bc8cd68b42e1e1da09a62 (diff)
downloadgdm-10418ea982f91f62a5052177578de2ecc3597317.tar.gz
launch-environment: don't name greeter log $display-greeter.log with user displays
If the X server is started as part of the session, we don't know the display up front. So don't try to encode the display in the log in that case. https://bugzilla.gnome.org/show_bug.cgi?id=787989
-rw-r--r--daemon/gdm-launch-environment.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/daemon/gdm-launch-environment.c b/daemon/gdm-launch-environment.c
index 5fd346ff..676ebc64 100644
--- a/daemon/gdm-launch-environment.c
+++ b/daemon/gdm-launch-environment.c
@@ -285,7 +285,11 @@ on_conversation_started (GdmSession *session,
char *log_path;
char *log_file;
- log_file = g_strdup_printf ("%s-greeter.log", launch_environment->priv->x11_display_name);
+ if (launch_environment->priv->x11_display_name != NULL)
+ log_file = g_strdup_printf ("%s-greeter.log", launch_environment->priv->x11_display_name);
+ else
+ log_file = g_strdup ("greeter.log");
+
log_path = g_build_filename (LOGDIR, log_file, NULL);
g_free (log_file);