# Is there a way to suppress the screen output of alert messages?



## WATANABE Takeo (Mar 3, 2021)

Is there a way to suppress messages like alerts that suddenly appear on the screen when using a console or editor (such as vi)? When this is output, the screen is disturbed and it becomes difficult to operate the editor, which is very troublesome. If you have any good wisdom, please tell me the improvement or solution.


----------



## zirias@ (Mar 3, 2021)

Old thread about a similar topic, well at least if I understood you correctly:








						Move FreeBSD kernel messages (white) to second console
					

By default FreeBSD puts kernel messages (white color) on the first console.  I know I can disable them with boot_mute in the /boot/loader.conf file, but is there a way to move them to second console instead of disabling them? ... or to redirect them to some file instead of disabling them...




					forums.freebsd.org
				




I never bothered, cause there are other virtual terminals to use (console is only on the first one, ttyv0).


----------



## SirDice (Mar 3, 2021)

WATANABE Takeo said:


> Is there a way to suppress messages like alerts that suddenly appear on the screen when using a console or editor (such as vi)?


It depends on the kind of message but you can disable logging to the console in /etc/syslog.conf, just remark this line and restart syslogd(8):

```
*.err;kern.warning;auth.notice;mail.crit                /dev/console
```



WATANABE Takeo said:


> When this is output, the screen is disturbed and it becomes difficult to operate the editor, which is very troublesome.


Hit CTRL-L to redraw the screen or, in vi(1)/vim(1), enter `ESC :redraw`


----------



## WATANABE Takeo (Mar 3, 2021)

SirDice said:


> It depends on the kind of message but you can disable logging to the console in /etc/syslog.conf, just remark this line and restart syslogd(8):
> 
> ```
> *.err;kern.warning;auth.notice;mail.crit                /dev/console
> ...


Thank you for your advice. Let's take a look at the method you pointed out. Also, I didn't know how to redraw it, so it was helpful. thank you very much. Over time, I'll post an article about this on my blog as information from the forums.


----------



## zirias@ (Mar 3, 2021)

WATANABE Takeo said:


> Thank you for your advice. Let's take a look at the method you pointed out. Also, I didn't know how to redraw it, so it was helpful. thank you very much. Over time, I'll post an article about this on my blog as information from the forums.


Just an additional thought: I think having console output (at least from the kernel, but maybe important log messages as configured by default as well) IS useful. It's of course up to you to decide.

But if you want to keep it, it has to live somewhere, so why not on the first virtual terminal? Maybe it's also possible not to run `getty` on ttyv0, so you don't login where the messages will appear accidentally? Didn't try though...


----------



## scottro (Mar 3, 2021)

I agree with Zirias. I think the output is sometimes useful. I have a yoga2 with a touchscreen that produces too much noise, so I just do alt+F2, and do any console work there. This way, you can work undisturbed as well as have console messages in case they have something useful.


----------

