How to disable broadcast messages on my linux session?

8

3

I get every 10 min many broadcast messages (maybe by other user). How can I disable those broadcast messages, in order to not see them on my screen?

yael

Posted 2010-06-17T12:29:12.007

Reputation: 379

I don't know if this is what the OP means, but I'm looking for the answer to a similar question. I'm seeing broadcast messages showing up in a terminal when logged in to a remote server over SSH. Although not exactly the same, similar messages can be created by logging in to the same machine in another terminal and typing "logger -p local3.emerg foobar". That gets me a Broadcast message from systemd-journald@machine\nbla bla bla in every terminal. This occurs on our debian servers, but not on my Ubuntu desktop. mesg n did not stop them. I'm looking to disable it only in this terminal. – Peter V. Mørch – 2015-03-23T13:21:37.603

Answers

11

If they are using wall or write a similar method to write on your terminal or terminals, then mesg n will stop the messages from coming to you.

If you mean something else, explain "broadcast messages" more precisely.

From your comments you seem to be still expecting an answer, so here is the one that you didn't read or didn't understand:

If someone has root on your machine, they can do anything they want to annoy you. Be glad they aren't killing your shells and removing your files. The only thing you can do to stop the annoyance is log out or ask the irritating person to stop. There is no technical solution; you are asking where the button is to make some kid stop throwing pebbles at you. There is no such button.

msw

Posted 2010-06-17T12:29:12.007

Reputation: 3 287

8

I am assuming that you are getting messages sent to your command-line/console window. If that is the case try this:

$ mesg n

If the messages don't stop they are likely coming from a user/process with root-level permissions, which cannot be stopped.

You mentioned a predictable 10 minute cycle. That could indicate the message is being generated by some daemon process. Maybe that process is using syslog to record messages. If so, it is then possible that syslog is configured to send messages that match certain criteria to users' terminals. Look through /etc/syslog.conf for possible culprits. The documentation you can see by running man syslog.conf should be able to get you started. I'd suggest starting with the "EXAMPLES" section.

gestep

Posted 2010-06-17T12:29:12.007

Reputation: 81

4

Make sure that $ mesg n is applied in your account. If you su to another user and try that command, you will see mesg: cannot change mode.

george

Posted 2010-06-17T12:29:12.007

Reputation: 41

I edited your answer, if you are unhappy with the changes feel free to revert them or edit it again. – Baarn – 2012-08-28T20:07:04.327

1

Try setting loglevel=3 in your boot parameters.

The loglevel parameter suppresses all messages with a level greater than, or equal to, the number specified.

The levels are:

 0 - Critical, system unusable    
 1 - Immediate action required    
 2 - Critical event    
 3 - Error    
 4 - Warning    
 5 - Notice    
 6 - Informative    
 7 - Debugging information

Peter Trenholme

Posted 2010-06-17T12:29:12.007

Reputation: 11