Hello,
“wall” command doesn’t display a message on Leap 42.2, worked nicely on 13.2.
Has it changed in any way? Would you advise any other command that does anything similar to it?
It was really useful for me.
Best regards.
Hello,
“wall” command doesn’t display a message on Leap 42.2, worked nicely on 13.2.
Has it changed in any way? Would you advise any other command that does anything similar to it?
It was really useful for me.
Best regards.
Your post lacks important information.
Where do you expect a message and it doesn’t show?
In the shell/terminal? On your desktop?
And if the latter, which desktop?
wall itself doesn’t display messages anywhere, it just sends them.
“wall” if used by root, will display a message in any open terminal.
I used it on scripts, to let me know something was wrong without the need to monitor a log, the message simply displayed in any open terminal.
And if you’ve read the manual page of wall you would’ve seen:
"DESCRIPTION
wall displays a message, or the contents of a file, or otherwise its standard input, on the terminals of all currently logged in users.
The command will wrap lines that are longer than 79 characters. Short lines are whitespace padded to have 79 characters. The command will
always put a carriage return and new line at the end of each line.
Only the superuser can write on the terminals of users who have chosen to deny messages or are using a program which automatically denies
messages.
Reading from a file is refused when the invoker is not superuser and the program is suid or sgid."
So are we talking about the same “wall” command?
I’m pretty sure that wolfi is talking about the same “wall” command.
What software are you using for the terminal?
I checked with:
ls -l `tty`
If I run that from an “xterm” session, then I see that the terminal device is group-writable and “wall” should display a message no matter who uses it. But if I instead use a “konsole” session or a “yakuake” session, then the terminal device is not group-writable, so “wall” will only display there if it comes from root or from myself.
I’m not sure if this is a change to “konsole” from Plasma 4. In any case, you could use the command
chmod g+w `tty`
to change it. Perhaps put the command in “.profile” or a similar place so that it is automatically run on konsole startup (assuming that you use “konsole”).
Just curious, what does
mesg
output?
Hey,
to answer the terminal, is a gnome-terminal.
tty
crw–w---- 1 admin tty 136, 0 Feb 13 18:39 /dev/pts/0
Sending the command on the gnome-terminal it just beeps.
You are right about Xterm, it works:
Broadcast message from admin@user.suse (pts/4) (Mon Feb 13 18:41:52 2017):
test
It displayed the message and beeped.
But in the output of “ls -l” on xterm show the same permissions:
tty
crw–w---- 1 admin tty 136, 4 Feb 13 18:44 /dev/pts/4
"chmod g+w tty
" did not change anything though.
Which now made me very confused, if both have similar permissions why only one of them stdouts the message?
For me:
In an “xterm” window, it give “y”. In a konsole window or yakuake window, it give “n”.
I had forgotten about the “mesg” command.
Checking my shell startup file, it contains
#mesg n > /dev/null
As you can see, it is commented out.
I needed that when on a multi-user system, and my students wanted to bug me with messages. But I don’t need it on my home system.
Actually, with “xterm”, you can use “-ut” as a command line option. And then there is no “utmp” entry so “wall” won’t even attempt to send messages to that terminal.
I just tested that. It seems that gnome-terminal does not write an entry to the “utmp” database. So the “wall” command does not find your terminal (it uses “utmp” to identify users).
However Gnome startup does itself write a “utmp” entry for the Gnome session. So it is probably catching the “wall” and then sending a beep through the sound system as a notification.
Well, thank you guys for the insights. I guess I’ll have to run the script and keep the Xterm open to check for the wall alerts.