"wall" command doesn't work in Fedora 40

, ,

Hello.
After upgrading to Fedora 40 KDE from Fedora 39 KDE I’ve noticed that wall command stopped working.

You can check this issue with Live Installer ISOs:

  • In Fedora 39 KDE Spin Live ISO typing wall abc in terminal will show desktop notification and broadcast the message to all ttys.
  • In Fedora 40 KDE Spin Live ISO (also happens with fully upgraded Fedora 40) typing wall abc will not do anything. No notifications, no messages in terminal. Nothing shows in journalctl -f when running the wall command. echo $? shows 0.

reboot command shows desktop notification and broadcasts the message (“The system will reboot now!”) to all ttys like wall should do.

I’ve been using wall to get desktop notifications from my automatic scripts running as root.

I couldn’t find anyone talking about this problem anywhere and I don’t see anything about wall in Fedora 40 changelog.
I didn’t report this bug at bugzilla, because I just encountered it and I’m not familiar with bugzilla. I wanted to ask if anyone has a workaround first.

You might want to look at rwall since it seems more in tune with a automated setup like what you’re using. It uses a daemon and a client. I can’t get wall to issue a message to my terminals, but I don’t have multiple users logged in.

2 Likes

It was a change in the upstream util-linux package. No reason for the change was given.

In the old days, wall found the list of active sessions in the utmp file (/run/utmp). That was changed to get that information from logind as shown when running loginctl. Here the TTY is given as tty1 and that is where wall will be writing its message. Of course, that would be invisible as long as you have a graphical session running on tty1. If you login in on one of the vt-consoles (tty3, tty4, etc) wall works as designed.

3 Likes

Thank you for your replies!

I don’t want to install any packages. I want to keep my scripts simple and only use utils that are available by default on most Linux distros whenever possible.

I’ve found this command in the Arch wiki: sudo -u X_user DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/X_userid/bus notify-send 'Hello world!' 'This is an example notification.'
It works perfectly. From what I see, libnotify is installed by default on Fedora.

I can send messages to terminals (e.g. SSH sessions) with echo "Hello" > /dev/pts/X

I will replace wall with notify-send in all of my scripts.

By the way, if wall changed how it sends messages, that means KDE devs just need to change how Plasma Desktop catches them and they can still display them, right? I’ve found a way to display desktop notifications with notify-send so I won’t fill a bug at KDE bugtracker right now.

1 Like