* Vincent Lefevre <vinc...@vinc17.net> [250217 00:28]: > On 2025-02-16 23:56:43 +0100, Chris Hofstaedtler wrote: > > * Michael Stone <mst...@debian.org> [250216 22:45]: > > > On Sun, Feb 16, 2025 at 07:05:13PM +0100, Vincent Lefevre wrote: > > > > No, w(1) is broken (at least in sid). See the difference between > > > > "who" and "w" with systemd 256.7-1, i.e. before the upgrade of > > > > systemd that removed utmp support: > > > > > > That's because someone decided to suddenly remove an interface which has > > > been used for decades without any kind of transition plan or replacement. > > > > Clearly there is a replacement, because the data is there: > > > > % w > > 23:53:23 up 1 min, 2 users, load average: 0.06, 0.03, 0.00 > > USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT > > ch 192.168.64.1 23:53 1:24 0.00s 0.02s > > sshd-session: ch [priv] > > ch - 23:53 1:24 0.00s 0.04s > > /usr/lib/systemd/systemd --user > > No data for xterm. Other terminals are affected too, such as > GNOME Terminal.
AFAIK this is expected. You should have a single entry for the X session, if you started it from a session manager. > > % loginctl > > SESSION UID USER SEAT LEADER CLASS TTY IDLE SINCE > > 1 1000 ch - 601 user - no - > > 2 1000 ch - 606 manager - no - > > > > 2 sessions listed. > > On my Debian/unstable machine, I do not even get the same number > of lines as with "w" when mosh is used. Did you file a bug with mosh for investigation? > No such issue with "who" > and old systemd with utmp enabled. > > > But who: > > > > % who > > % > > > > Chris > > > > PS: Lack of tty in the list is IIRC some problem with openssh not > > passing the TTY to PAM, but this is a separate thing. > > But with old system versions (and/or old "w" versions), such as in > Debian/stable (bookworm), the tty is shown by "w": As I said. In old versions it works because sshd "passes the tty to" (= directly writes it into) utmp. IIRC it doesn't pass the tty to PAM, where libpam-systemd could pick it up. Chris (Dropped most people from CC:, because this is really not an upstream coreutils problem now.)