2

I can't send message to another user in spite of enabling message. I'm using ubuntu 20.04 on VMware workstation.

Window 1

nguyenvanen@nguyenvanen:~$ mesg
is y
nguyenvanen@nguyenvanen:~$ _

Window 2

itachi@nguyenvanen:~$ write nguyenvanan
write: nguyenvanan has messages disabled
itachi@nguyenvanen:~$ _

Illustration

Illustration

roaima
  • 107,089
  • 14
  • 139
  • 261
  • 4
    Please don't post pictures of text. It's really difficult to read. Instead, copy and paste. – roaima Sep 18 '20 at 07:46
  • 1
    How did you start the terminal window for the user that doesn't own the graphical login (or both users, if none of them is the one that started the graphical session)? Using `ssh`? `su` or a graphical version of `su`? Something else? – fra-san Sep 18 '20 at 09:26

1 Answers1

5

The write command is a very simple utility. Unless you tell it otherwise it writes to the first terminal it finds you logged in on.

In the target shell, use tty to find out the name of the device you're using there. Then add that name (without the /dev/ prefix) as another parameter to the write command.

For example if you found it was /dev/pts/2 you'd use this

write nguyenvanen pts/2
roaima
  • 107,089
  • 14
  • 139
  • 261