On 2026-06-26 15:55:52 +0200, Alexander Sulfrian wrote:
> I debugged it further: "wall" works by using the TTY information from
> logind. So all sessions that do not have a TTY in logind will not get
> notified by "wall."
This is not true. With the re-creation of /run/utmp by
libutempter0 1.2.1-5, the xterm windows get the wall message.
> Logind gets the TTY from the PAM_TTY attribute. SSH does not set the TTY
> while executing the PAM session hooks because it allocates the TTY later,
> and may not have to allocate a TTY at all. So SSH sets PAM_TTY to "ssh", and
> logind ignores the TTY if it is set to "ssh".
Anyway, not all terminals run ssh.
> What confused me was that logind on Bookworm does show the TTY information
> for SSH connections. It turns out that on Bookworm, logind is using the TTY
> information from UTMP. However, UTMP was removed in Trixie.
If I understand correctly, /run/utmp was created by some systemd
package, and this is no longer done:
systemd (256.7-2) unstable; urgency=medium
[...]
* Disable utmp support, not y2038 safe. utmp support in tmux has been
disabled, so autopkgtest should no longer break
But since it is still used by libutempter (and the terminals that
use this library), it is now recreated there:
/usr/lib/tmpfiles.d/libutempter0.conf contains
f /run/utmp 0664 root utmp
But since utmp support is currently not y2038 safe, there are
3 solutions until 2038 comes:
1. Make utmp y2038 safe (e.g. by changing the timestamp to 64 bits,
which would need to rebuild the few programs that still use it).
2. Ignore the time in utmp (it doesn't seem to be used any longer,
since "who" and "w" no longer use utmp).
3. Entirely replace utmp by logind for plain text terminals, e.g.
started from the window manager or from other applications
(PAM is not involved, so there should be some documentation
on what to do).
> So we need another way to set the TTY for the logind session to make "wall"
> work again.
Currently, there is no logind session for plain text terminals.
--
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)