diff options
author | Ray Strode <rstrode@redhat.com> | 2015-04-02 11:33:20 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2015-04-02 15:21:22 -0400 |
commit | 1edb0e4ae897cb1c53af3f3b2b913d5baf731580 (patch) | |
tree | bf75fa73451bf08c0e32d21dcb411c1a0deed0f9 | |
parent | 6902187cfbe81d549a374083501a54bd66df41c9 (diff) | |
download | gdm-1edb0e4ae897cb1c53af3f3b2b913d5baf731580.tar.gz |
session-record: support NULL display name if tty available
wayland sessions don't necessarily have a display name, so this
commit just uses the display device instead.
https://bugzilla.gnome.org/show_bug.cgi?id=747169
-rw-r--r-- | daemon/gdm-manager.c | 2 | ||||
-rw-r--r-- | daemon/gdm-session-record.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c index 1eadcd4a..0dfce868 100644 --- a/daemon/gdm-manager.c +++ b/daemon/gdm-manager.c @@ -1085,7 +1085,7 @@ add_session_record (GdmManager *manager, "display-device", &display_device, NULL); - if (display_name == NULL) { + if (display_name == NULL && display_device == NULL) { goto out; } diff --git a/daemon/gdm-session-record.c b/daemon/gdm-session-record.c index 1585ef59..da824aaf 100644 --- a/daemon/gdm-session-record.c +++ b/daemon/gdm-session-record.c @@ -205,6 +205,9 @@ gdm_session_record_login (GPid session_pid, UTMP session_record = { 0 }; UTMP *u; + if (x11_display_name == NULL) + x11_display_name = display_device; + record_set_username (&session_record, user_name); g_debug ("Writing login record"); |