Yes it true that gnome-terminal it doesn't update login records, en because of that i try to figure out another solution:
- Let's find out all active pseudo terminals
ps -ef | grep " pts/" | awk '{print $6}' | sort -u | tee terminals4message.txt
This helps you to list all desktop terminal sessions.
Another way to send a message to active desktop terminal sessions
echo "$MESSAGE_to_send" | sudo tee /dev/pts/$terminal_number
- Don't forget about tty sesions
ps -ef | grep " tty" | awk '{print $6}' | sort -u | grep -v "pts" | tee terminals4message.txt
This helps you to list all pty sessions
- Sending the message to all
cat terminals4message.txt | while read TTY_TO; do echo -e "SYSTEM MESAGE: $(date) - \n MESAJ" | sudo tee /dev/$TTY_TO 1>/dev/null
- Now let's put it all together
You can create a nice script to replace your current wall app and integrate the all above things.
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 wall
Sorry 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
xmessage
,gxmessage
, ornotify-send
) – Nick Weinberg Jun 20 '16 at 23:25notify-send
works for only short messages and only in GUI.wall
has good convenience of using one command for all terminals, instead of writing something for tty AND for gui AND for all the other sessions that may be on otherDISPLAY
s , so this is not a very good alternative, at least imho – Sergiy Kolodyazhnyy Jun 20 '16 at 23:32who
in gnome terminal before, I'd show all your open tabs but not anymore. Wall sends message only to those terminal sessions that update login records. Mate uses different terminal by default. I figured this out long ago but never actually posted an answer. Will do so at some point this week. – Sergiy Kolodyazhnyy Sep 12 '16 at 15:59– Stancu Mihai Jan 19 '17 at 13:29