I'm curious about the behavior of broadcast messages by
$ sudo wall myfile
the message from myfile appears on all /dev/ttyN devices (the ones to which I can switch by pressing Ctrl+Alt+fN), it also appears on the xterm windows I have opened, but it doesn't appear on gnome-terminal (actually I use Linux Mint with MATE, so it's mate-terminal, but it is fork of gnome-terminal).
There's also interesting note if I run tmux in the xterm: I expected that the message would appear on all terminal sessions that are running in tmux (on all windows, and in each pane of each window), but actually the message appears just at current cursor position in the xterm window.
If I check current controlling terminal by calling tty, it reports different terminals for different windows in tmux: say, I have /dev/pts/11 in one tmux window and /dev/pts/12 in another one. But, broadcast message appears just once for each xterm window, not for each terminal session opened in tmux.
It seems to me that terminal emulator, when allocating pseudo-terminal, needs, like, "registering" it somewhere to make it able to receive broadcast messages, and so, xterm does it, but mate-terminal and tmux does not. But it sounds weird since pseudo-terminal is allocated by the kernel, so, it should be "registered" automatically everywhere it needs to be.
I'd be glad if someone explain how does it work and why the behavior is that (seemingly weird).
gnome-terminal, but not withurxvt. – fiatjaf Apr 20 '16 at 14:32mesg? – Jeff Schaller Apr 20 '16 at 14:39mesg "is y"both ongnome-terminalandurxvthere. – fiatjaf Apr 20 '16 at 15:39tmuxsolves the problem withgnome-terminal. Thank you all for the tip! – dess Jan 08 '22 at 19:35