You are not logged in.

#1 2017-01-24 08:01:32

adesh
Member
Registered: 2016-10-05
Posts: 167

[SOLVED] utmp does not update when using LXDM

I'm currently using LXDM display manager with Xfce. After login, 'who' and friends don't see me as logged in as no entry is added to utmp. logname also doesn't return my log name.
When using virtual console or other display manager (LightDM, XDM) to login, utmp gets updated and I can see myself as logged in using 'who' and other tools.
I came across some articles which suggested emptying utmp file and rebooting. Tried that but the issue remains.

Is this a bug in LXDM or this kind of behaviour is normal for a display manager? How can this be "fixed"?
(I can swith to LightDM but would like to know more about this problem and possibly fix it.)

Using LXDM:

$ last -f /run/utmp 
reboot   system boot  4.8.13-1-ARCH    Tue Jan 24 10:03   still running

utmp begins Tue Jan 24 10:03:07 2017
$
$ who
$

Using LightDM or XDM:

$ last -f /run/utmp 
don      tty7         :0               Tue Jan 24 09:48    gone - no logout
reboot   system boot  4.8.13-1-ARCH    Tue Jan 24 09:48   still running

utmp begins Tue Jan 24 09:48:14 2017
$
$ who
don      tty7         2017-01-24 09:48 (:0)
$

Last edited by adesh (2017-01-25 09:34:01)

Offline

#2 2017-01-24 12:01:42

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,507

Re: [SOLVED] utmp does not update when using LXDM

any dbus-launch or ck-launch-session in your process list?

Offline

#3 2017-01-24 17:07:01

adesh
Member
Registered: 2016-10-05
Posts: 167

Re: [SOLVED] utmp does not update when using LXDM

Yes, there is a bus launcher.

$ ps -ef | grep launch
don       504   455  0 10:03 ?        00:00:00 /usr/lib/at-spi2-core/at-spi-bus-launcher
don      1689 26275  0 22:32 pts/1    00:00:00 grep --color=auto launch

Offline

#4 2017-01-24 17:10:03

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] utmp does not update when using LXDM

That's not what he asked. Shouldn't matter, though.

utmp is optional. Many things don't update it.

Offline

#5 2017-01-24 18:54:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,507

Re: [SOLVED] utmp does not update when using LXDM

Check  "loginctl session-status" - if that reports an active session for your user, all is fine and the utmp lack is undercritical.

If you require utmp data, see "man 1 sessreg"

Offline

#6 2017-01-25 03:32:11

adesh
Member
Registered: 2016-10-05
Posts: 167

Re: [SOLVED] utmp does not update when using LXDM

$ loginctl session-status 
Could not get properties: No such device or address

Maybe you meant show-session:

$ loginctl show-session $XDG_SESSION_ID --property Active
Active=yes

BTW, I've not installed xorg-sessreg. Can look into that.

Now, if utmp cannot be relied on, what would be a better way to get the list of currently logged in users? Because almost every article on internet tells to do it using commands like 'who', which just read out the data utmp has.
Please advise.

Offline

#7 2017-01-25 08:24:24

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,507

Re: [SOLVED] utmp does not update when using LXDM

No, but it seems that is another issue with lxdm (see https://bbs.archlinux.org/viewtopic.php?id=216310)

"loginctl list-sessions", but I assume this won't work with lxdm either because you *have* no proper session.
So the advise is: don't use lxdm.

Offline

#8 2017-01-25 09:02:16

adesh
Member
Registered: 2016-10-05
Posts: 167

Re: [SOLVED] utmp does not update when using LXDM

seth wrote:

"loginctl list-sessions", but I assume this won't work with lxdm either because you *have* no proper session.

"list-sessions" lists my session:

$ loginctl list-sessions 
   SESSION        UID USER             SEAT             TTY             
        c1       1000 don             seat0            tty1            

1 sessions listed.

Offline

#9 2017-01-25 09:12:11

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,507

Re: [SOLVED] utmp does not update when using LXDM

Ok, so just session-status "broken". Use list-sessions or register your lxdm triggered sessions with sessreg then.

Offline

#10 2017-01-25 09:33:08

adesh
Member
Registered: 2016-10-05
Posts: 167

Re: [SOLVED] utmp does not update when using LXDM

Thanks seth!

Offline

Board footer

Powered by FluxBB