So, wall appears to be broken in a polkit+systemd+loginctl world due to missing /dev/seat0 -- I'm not sure where in the path things breakdown, but it was trivial to reproduce: - set USE=tty-helpers on util-linux - `echo 'lol' | wall` - Get error: # echo lol | wall wall: /dev/seat0: No such file or directory It also errors in write, when fed seat0 explicitly: # echo 'lol' | write jay seat0 write: /dev/seat0: No such file or directory This is likely something introduced upstream; it's reported as broken by a friend of mine running CentOS Stream 8 with all packages updated as well but still seems to work in e.g. ubuntu. Happy to do anything I can to help troubleshoot the problem :). I'll note this likely will impact nut as well as any other applications which expect to be able to write messages to ttys using write/wall.
This is happening on =sys-apps/util-linux-2.38.1-r2. I will test and report back if behavior changes on ~amd64 util-linux; but I don't expect it to.
Works fine for me with sys-apps/util-linux-2.39.1. % echo foo | wall Broadcast message from floppym@naomi (pts/3) (Thu Jul 27 16:14:49 2023): foo
What does the "w" command show on your system? % w 16:16:30 up 6 days, 16:45, 5 users, load average: 0.03, 0.04, 1.19 USER TTY LOGIN@ IDLE JCPU PCPU WHAT floppym tty2 20Jul23 6days 0.20s 0.20s /usr/bin/startplasma-wayland floppym pts/1 20Jul23 6days 0.00s 1:22 /usr/bin/kded5 floppym pts/2 Wed20 14:55m 0.07s 0.07s /bin/zsh floppym pts/3 16:13 3.00s 0.07s 0.01s w floppym pts/4 16:15 1:02 0.04s 0.04s -zsh
jay in ~ ❯ w 13:26:18 up 4:54, 2 users, load average: 4.41, 9.33, 9.04 USER TTY LOGIN@ IDLE JCPU PCPU WHAT jay seat0 08:31 0.00s 0.00s 0.00s /usr/libexec/gdm-wayland-session /usr/bin/gnome-session jay tty2 08:31 4:54m 0.00s 0.00s /usr/libexec/gnome-session-binary jay in ~ ❯ loginctl SESSION UID USER SEAT TTY 3 1000 jay seat0 tty2 1 sessions listed. jay in ~ ❯ (I'll note; the seat0 in output is identical to what my friend reproducing this on CentOS Stream 8 saw, too)
I reproduced this using 2.39.1 as well; I could not try it with -9999 due to bug 911339
So it appears that GDM is setting the ut_line field to "seat0" in the utmp database. This is supposed to be a valid tty device. "seat0" is never a valid tty device. Re-assigning this to the GNOME team.
It appears that wall already has some special handling to skip X11 sessions, which may have a ut_line value starting with ":". https://github.com/util-linux/util-linux/blob/v2.39.1/term-utils/wall.c#L256 If you can't convince the GNOME developers to stop putting "seatN" in ut_line, you might be able to convince the util-linux developers to add another special case.
Created attachment 866642 [details, diff] util-linux patch Here's a patch for the wall command. Please test.
I confirm the posted patch suppresses the error.
Ok, swapping this back to util-linux and base-system. Upstream pull request is in See Also.
The fix has been merged upstream, and should be included in the next major release. Given the low impact of this issue, I am not inclined to backport the fix, but let me know if you feel otherwise.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a7839bf00b46ac9675d8e05998130d29e77135d commit 5a7839bf00b46ac9675d8e05998130d29e77135d Author: Sam James <sam@gentoo.org> AuthorDate: 2023-08-03 19:02:43 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-08-03 19:03:20 +0000 sys-apps/util-linux: fix mount with older kernels (no statx); fix wall Ended up backporting the wall fix as we need the mount w/ no statx fix anyway. Bug: https://bugs.gentoo.org/911336 Bug: https://github.com/util-linux/util-linux/issues/2409 Signed-off-by: Sam James <sam@gentoo.org> .../files/util-linux-2.39.1-mount-no-statx.patch | 34 ++ .../files/util-linux-2.39.1-wall-no-tty.patch | 26 ++ sys-apps/util-linux/util-linux-2.39.1-r1.ebuild | 402 +++++++++++++++++++++ 3 files changed, 462 insertions(+)