After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 692253 - user-accounts: empty login history window
user-accounts: empty login history window
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: User Accounts
git master
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-22 05:39 UTC by Jeremy Bicha
Modified: 2013-06-26 09:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
login-history.txt (74.94 KB, text/plain)
2013-01-22 05:39 UTC, Jeremy Bicha
  Details
Fix empty login history (959 bytes, patch)
2013-01-23 14:29 UTC, Ondrej Holy
reviewed Details | Review
Fix empty login history (1.03 KB, patch)
2013-03-14 15:44 UTC, Ondrej Holy
committed Details | Review

Description Jeremy Bicha 2013-01-22 05:39:06 UTC
Created attachment 234068 [details]
login-history.txt

gnome-control-center 3.7.4 with gnome-settings-daemon 3.7.4 and accountsservice 0.6.30 on Ubuntu 13.04 Alpha

The new Login History window in User Accounts is empty (the dialog displays fine; there just aren't any login entries). It doesn't matter whether I unlock the User Accounts panel.

I am attaching the output of:

dbus-send --system --print-reply --dest=org.freedesktop.Accounts /org/freedesktop/Accounts/User1000 org.freedesktop.DBus.Properties.Get string:'org.freedesktop.Accounts.User' string:'LoginHistory'
Comment 1 Ondrej Holy 2013-01-23 14:29:37 UTC
Created attachment 234205 [details] [review]
Fix empty login history

Ubuntu has obviously different wtmp records then Fedora. We should to enable also "tty" wtmp records to fix this bug. These "tty" records are used for terminal access.

It'll be probably necessary to make some design changes of history dialog, because if somebody is logged in multiple times (e.g. using terminal), login history should look like probably:

15:00 Session Ended
14:00 Session Ended
13:00 Session Started
12:00 Session Started

...but it isn't clear which session ended in what time. However currently it looks like:

15:00 Session Ended
13:00 Session Started
14:00 Session Ended
12:00 Session Started 

...what is also obviously confusing.
Comment 2 Ray Strode [halfline] 2013-03-14 14:43:34 UTC
Review of attachment 234205 [details] [review]:

hmm

::: panels/user-accounts/um-history-dialog.c
@@ +205,3 @@
                 /* Display only x-sessions */
+                if (!g_str_has_prefix (history.type, ":") &&
+                    !g_str_has_prefix (history.type, "tty")) {

So the comment above says "Display only x-sessions" but now we're not going to display only X sesssions, right?
Comment 3 Ray Strode [halfline] 2013-03-14 14:44:50 UTC
Jeremy, could this problem be because LightDM is writing out its wtmp entries' ut_line field in a way that doesn't include display information?  If so, could we get LightDM changed?
Comment 4 Ondrej Holy 2013-03-14 15:44:58 UTC
Created attachment 238886 [details] [review]
Fix empty login history

Fixed comment to be more precise, but change in LightDM would be probably better...
Comment 5 Bastien Nocera 2013-05-13 14:22:01 UTC
Review of attachment 238886 [details] [review]:

Looks good.
Comment 6 Jeremy Bicha 2013-05-19 02:59:26 UTC
The login history window is no longer empty here with gnome-control-center 3.8.2. I believe the change is because Ubuntu 13.10 (or 13.04 with the GNOME3 Staging PPA) now uses logind. I use GDM.
Comment 7 Philippe "RzR" Coval 2013-06-24 15:29:31 UTC
This was commited for 3.9.2 , but not merged to gnome-3-8 branch are there any reason, I will try and report if there are issues with it ...

Regards
Comment 8 Ondrej Holy 2013-06-26 09:14:47 UTC
(In reply to comment #7)
> This was commited for 3.9.2 , but not merged to gnome-3-8 branch are there any
> reason, I will try and report if there are issues with it ...

There isn't any reason, I've commited it now for gnome-3-8...

commit 0925d95ee75e3351366b852999ddcfc3ede22cf9