You are not logged in.
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
any dbus-launch or ck-launch-session in your process list?
Offline
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 launchOffline
That's not what he asked. Shouldn't matter, though.
utmp is optional. Many things don't update it.
Offline
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
$ loginctl session-status
Could not get properties: No such device or addressMaybe you meant show-session:
$ loginctl show-session $XDG_SESSION_ID --property Active
Active=yesBTW, 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
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
"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
Ok, so just session-status "broken". Use list-sessions or register your lxdm triggered sessions with sessreg then.
Offline
Thanks seth!
Offline