Bug 1739494 - LXDM doesn't use/update /var/run/utmp
Summary: LXDM doesn't use/update /var/run/utmp
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: lxdm
Version: rawhide
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Mamoru TASAKA
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-09 12:57 UTC by Artem S. Tashkinov
Modified: 2024-02-26 16:18 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Artem S. Tashkinov 2019-08-09 12:57:45 UTC
Description of problem:

# w
 17:55:26 up  3:08,  0 users,  load average: 1.65, 1.18, 0.87
USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT


Version-Release number of selected component (if applicable): procps-ng-3.3.15-5.fc30.x86_64



How reproducible: always


Steps to Reproduce:
1. run terminal
2. w
3.

Actual results: nothing


Expected results: show who's logged-on


Additional info:

I'm using LXDM + XFCE.

Comment 1 Artem S. Tashkinov 2019-08-09 13:00:29 UTC
Probably it's a bug in systemd:

# strings /var/run/utmp 
reboot
5.2.7-ic64
@M]-
runlevel
5.2.7-ic64

Comment 2 Artem S. Tashkinov 2019-08-09 13:06:17 UTC
According to `last` I've had zero graphical logins over the course of running Fedora 30 for the past five months or so - it only logs/shows tty logins. Weird.

Comment 3 Artem S. Tashkinov 2019-08-09 13:16:22 UTC
This might be an old bug in LXDM: https://bugs.launchpad.net/ubuntu/+source/lxdm/+bug/1201134

Comment 4 Jan Rybar 2019-08-09 14:25:31 UTC
Hello,

As you mentioned in comment#3, this might be DE problem. For example Gnome has similar problem but the other way around as it does not remove terminated sessions from UTMP file. It seems to be the DE session agent responsibility.

Comment 5 Ben Cotton 2019-08-13 16:47:04 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 6 Artem S. Tashkinov 2019-10-17 12:40:31 UTC
I'd really like this bug to fixed in less than five years. I don't think it's too difficult to resolve.

Comment 7 Artem S. Tashkinov 2019-10-17 13:30:51 UTC
In fact a Fedora user complained about this issue more than two years ago:

https://forums.fedoraforum.org/showthread.php?317728-wtmp-not-showing-lxdm

Actually the bug has been known for over ten years already:

https://forum.lxde.org/viewtopic.php?t=31792
https://sourceforge.net/p/lxde/mailman/message/25491352/
https://bugs.launchpad.net/ubuntu/+source/lxdm/+bug/1201134

sessreg -a -l $DISPLAY $USER works but it needs to be run under the root user, so using /etc/lxdm/PostLogin doesn't sound feasible unless you set up sudo which doesn't seem advisable.

In short, it should probably be done inside lxdm-session

Comment 8 Artem S. Tashkinov 2019-11-22 16:55:30 UTC
Is the maintainer of this package alive and well?

I'd like to get some sort of response.

Comment 10 Mamoru TASAKA 2019-11-24 23:05:45 UTC
Okay, then I will reply. Are are any rationale / specification about how DE should behave wrt /var/run/utmp ? That is, I must report this to upstream that "as this is written _here_, this must be fixed." Otherwise I don't know how to modify the current behavior.

Comment 11 Artem S. Tashkinov 2019-11-25 00:22:35 UTC
(In reply to Mamoru TASAKA from comment #10)

> Okay, then I will reply. Are are any rationale / specification about how DE should behave wrt /var/run/utmp ? That is, I must report this to upstream that "as this is written _here_, this must be fixed." Otherwise I don't know how to modify the current behavior.

LXDM does NOT register a user session as indicated by `w`/`who` and it's a session manager job to do that.

SSDM does it here: https://github.com/sddm/sddm/blob/develop/src/helper/HelperApp.cpp
KDM from KDE3 does it here: https://sourceforge.net/p/kde3/kdebase/ci/master/tree/kdm/backend/dm.c
LightDM does it here: https://github.com/canonical/lightdm/blob/master/src/session-child.c
XDM does it this way: https://gitlab.freedesktop.org/xorg/app/xdm/blob/master/config/Xstartup.in

I wonder why I have to explain the basics of session management to developers.

With all the changes wrt to session management loginctl is probably the way to go forward but some older utilities depend on w/who utilities functioning properly and I've no desire to file bug reports against them as well because other graphical session managers do their job properly.

TLDR I want to see my user session when running w/who. LXDM is the only graphical session manager that I'm aware of which doesn't register sessions in utmp.

Comment 12 Mamoru TASAKA 2019-11-25 05:18:27 UTC
I am not asking implementations of each DM but I am asking specification.

Comment 13 Mamoru TASAKA 2019-11-25 05:20:35 UTC
(In other words, I ask the rationale why lxdm must support w/who)

Comment 14 Mamoru TASAKA 2019-11-25 05:25:50 UTC
(And of course, if you know each implementation, I appreciate it if you write some patches for lxdm, but anyway I need _specification_ )

Comment 15 Artem S. Tashkinov 2019-11-25 10:50:47 UTC
If Fedora maintainers/developers believe that the w/who/last utilities are useless and the applications which use their output must be rewritten to accommodate the benefits of systemd, then close this bug report.

I don't know what is that you're asking for as it makes no sense to me. *Four* other graphical session managers *do* *update* utmp records - LXDM does *not* - and you're asking me a specification? Who am I to you? A person with a deep knowledge of Linux source code and innards?

Should I also write a patch to fix this issue? God, this is retarded.

All I want is to `w`, `who` and `last` to work when I'm running a session under LXDM. That is it. None of them currently work!! I don't give a damn what specification is there for them to work. THEY DO NOT WORK.

How you're going to do that is up to you. I've provided you with more than enough info to figure it all out.

Comment 16 Ben Cotton 2020-11-03 16:47:11 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 17 Zbigniew Jędrzejewski-Szmek 2020-11-11 09:58:29 UTC
> If Fedora maintainers/developers believe that the w/who/last utilities are useless and the applications which use their output must be rewritten to accommodate the benefits of systemd

systemd supports utmp/wtmp. There are no plans to drop it. (utmp and wtmp are somewhat clunky,
but they work without causing any particular maintenance burden.) So please don't mix systemd into
this bug: it has nothing to do with systemd. Registering sessions with utmp/wtmp was always a
responsibility of individual login mechanisms.

Comment 18 Ben Cotton 2021-11-04 17:19:37 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 19 Artem S. Tashkinov 2022-03-31 13:43:38 UTC
Still not fixed.

Comment 20 Fedora Admin user for bugzilla script actions 2023-02-16 12:37:40 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 21 Artem S. Tashkinov 2023-03-26 08:04:19 UTC
Will this ever be fixed?

Comment 22 Artem S. Tashkinov 2023-03-26 08:04:56 UTC
Who do I have to ping to get this fixed?

Comment 23 Artem S. Tashkinov 2023-03-26 08:05:33 UTC
This bug has been open for half a decade already. It's been valid for I guess more than a decade now.

Comment 24 Artem S. Tashkinov 2023-03-26 08:07:43 UTC
Have utmp/wtmp been deprecated?

If they have, how can I get the log of past logins?

I'd like to get something like that:

$ last
birdie   tty2                          Sat Mar 25 16:22 - 16:35  (00:13)
reboot   system boot  6.1.14-200.fc37. Fri Mar 17 15:46   still running
root     tty2                          Wed Mar 15 11:55 - 11:57  (00:01)
reboot   system boot  6.1.14-200.fc37. Wed Mar 15 11:55 - 09:08  (21:12)

(as you can see my graphical logins are not logged).

Comment 25 Artem S. Tashkinov 2023-03-26 08:08:56 UTC
Almost a dozen people are CC'ed to this bug report.

Sorry for basically spamming but I hate how this situation has been handled.

Either Fedora/RedHat/IBM/whoever says: "It's not a bug, it's a feature" or, please, fix it.

Comment 26 Artem S. Tashkinov 2023-03-26 08:09:47 UTC
I wanna hope six emails in the mailboxes of the respective people are enough to get this bug report noticed.

Comment 27 Kamil Dudka 2023-03-26 08:45:49 UTC
(In reply to Artem S. Tashkinov from comment #26)
> I wanna hope six emails in the mailboxes of the respective people are enough to get this bug report noticed.

In my opinion, it will have the opposite effect.  People will unsubscribe from this bug to not receive SPAM.  It would have been more useful to propose a patch that fixes the problem.

Comment 28 Artem S. Tashkinov 2023-03-26 08:49:33 UTC
(In reply to Kamil Dudka from comment #27)

> In my opinion, it will have the opposite effect. 

This bug will soon be 5 years of age and nothing has been done to fix it.

> People will unsubscribe from this bug to not receive SPAM. 

Maybe the others will actually do something.

>  It would have been more useful to propose a patch that fixes the problem.

I'm a Fedora user, not a C programmer. This application is lacking a crucial feature required for proper logging of user sessions.

We are talking about a security issue after all.

Comment 29 Kamil Dudka 2023-03-26 10:06:55 UTC
I think none of the people you are spamming forces you to use lxdm or Fedora.  Feel free to use more secure or better supported alternatives if it does not work well for you.

Comment 30 Ben Cotton 2023-04-25 16:39:22 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 31 Fedora Admin user for bugzilla script actions 2023-07-18 12:13:06 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 32 fulalas123 2024-02-25 23:07:36 UTC
I made a patch for LXDM that adds support to utmp. Give it a try and let me know if it works for you: https://www.mediafire.com/file/pahz96re9ceb815/lxdm-add-remove-user-utmp.patch

It's basically an adaptation of the KDE implementation.

Comment 33 Artem S. Tashkinov 2024-02-26 12:53:14 UTC
Massive thanks for the patch, too bad X.org's days are numbered and LXDM is unlikely to be ported to Wayland.

Please merge.

Comment 34 Mamoru TASAKA 2024-02-26 13:40:21 UTC
firefox refuses to access to the patch.

Anyway, discuss with the upstream first. Then I can backport it if the upstream accepts the change.

Comment 35 fulalas123 2024-02-26 16:18:17 UTC
@Tashkinov, I see what you mean. But to most DEs (Budgie, Cinnamon, LXQt, MATE and Xfce) Wayland is probably not coming this year, which is good, because it's still not mature enough for all use cases where Xorg is. Not to mention LXDE, which most likely will never have support to Wayland.

@TASAKA, I use latest Firefox ESR and it downloads normally. Sorry, I won't talk to anyone upstream. Feel free to do whatever you want with the patch. All the best. :)


Note You need to log in before you can comment on or make changes to this bug.