7

I'm trying to send messages with either wall or write. To test this, I opened two gnome-terminal windows. Then entered the following in one window:

me@host>>wall
message to everyone


<ctrl> + d

When I finished the message I sent an interrupt signal EOF character with (ctrl-d). Instead of sending the message, the terminal beeped at me as if I entered invalid input. I get similar behavior with write. Can someone help me with what is wrong?

Edit: Here is the permissions info:

me@host>>ls -l $(type -p wall)
-rwxr-sr-x 1 root tty 27368 May 26 18:31 /usr/bin/wall

1 Answers1

3

Both wall and write on Debian (and Ubuntu) use setgid (set-group-id) privilege to the tty group to allow those programs to write into the terminals of other users.

However, it is common for administrators of shared computer systems to disable this feature. You can see the permissions by doing

ls -lL /usr/bin/write /usr/bin/wall

and on a normal system would see this (dates do not matter):

$ ls -lL /usr/bin/write /usr/bin/wall
-rwxr-sr-x 1 root tty 23056 Dec 11  2012 /usr/bin/wall
-rwxr-sr-x 1 root tty 14624 Jun 11  2012 /usr/bin/write

The s in the first field -rwxr-sr-x is the setgid bit, and the fourth field is the group tty. You need both (or an equivalent group) to make the feature work.

Besides permissions, there is another aspect which you will run into using gnome-terminal: wall and write send their messages to logged-in users. They get that information from the utmp data file, which gnome-terminal does not support.

Further reading:

Thomas Dickey
  • 76,765
  • I can see this answers the question as posed - but can it be boiled down to: say, if you're using Ubuntu 20.04 where the default terminal is gnome-terminal, you simply cannot use wall as intended at all? Or are there settings that can be changed, so wall works on those systems too? – sdbbs Feb 07 '22 at 00:18
  • See bug #71368 - looks like the answer is "no" – Thomas Dickey Feb 07 '22 at 01:29