I am currently seeing that, except it is with Leap 15.3 rather than with Tumbleweed. I am using “lightdm” as display manager, and I started a process with the command
xconsole &
Hmm, I rebooted, and tried again. This time, I did not run “xconsole”. And I still got that output. Perhaps it is just the way that “lightdm” works. Perhaps try a different displaymanager.
w and who show static record from /run/utmp. It is irrelevant what you run (or not run) as part of your session, it does not change utmp entry.
Perhaps it is just the way that “lightdm” works.
Not quite. The entry that we see is created by sessreg call in /etc/X11/xdm/Xstartup. utmp handling in lightdm is disabled in openSUSE (for years).
I compared with Leap 15.2 and I see the same behavior. So it does not look like regression. I do not have TW with lightdm, so it is quite possible that other display managers overwrite entry created by Xstartup or create additional entries or simply do not call default Xstartup at all.
In any case, there is no well defined API covering utmp content, so it is unwise to rely on it. Today systemd-logind provides defined API which allows you to also query terminal where session is active.