The title sums it up. Running wall <<< "TEST"
shows the message in any TTY but not in any GUI terminals ( tested with gnome-terminal
and sakura
).
I have several battery and temperature monitoring scripts that rely on wall
ing a message and after recent upgrade to 16.04 I've noticed they stopped working in GUI.
I can't determine whether this is a bug or something is preventing the messages from being displayed in GUI.
How should I proceed ?
Additional info:
Running byobu
in a gui terminal does allow seeing wall messages
Due to the way gnome-terminal works,
wall
does not register it as a terminal. A more thorough explanation can be found here. I assume that the same is true for sakura.Based on Stancu Mihai's answer, I have created a script which mimics the way
wall
usually works, including the banner with user name and timestamp (use -n or --nobanner to remove the banner). The script does not currently support reading the message from a file.You can replace the normal
wall
command with this one by adding an alias in~/.bashrc
:Example usage:
Yes it true that gnome-terminal it doesn't update login records, en because of that i try to figure out another solution:
This helps you to list all desktop terminal sessions.
Another way to send a message to active desktop terminal sessions
This helps you to list all pty sessions
After that you can add to your ~/.bashrc
alias wall="your_wall_replacement.sh"
In this way you don't need to delete the current wallSorry if something is not right, as somebody didn't let me focus on this subject...if you guys notice something odd please leave a comment.
10x
As others suggest there are many methods, I put here a more direct (easy) method I found (adoptation of
echo "$MESSAGE_to_send" | sudo tee /dev/pts/$terminal_number:
discussed here.)Here the
terminal-no
could be obtained from the other terminal through "tty" command./dev/pts/12