3

I read watch command's manual page, found -b or --beep:

-b, --beep

Beep if command has a non-zero exit.

So I did:

$ watch --beep ls /root

Using a non-root account and it doesn't make a sound like a beep. How should I use this command?

  • Do you have beep installed? sudo apt install beep – Are you speakers unmuted? – dessert Jun 29 '19 at 11:14
  • Do you know if you have an internal pc speaker connected to your mother board? – Samuel Jun 29 '19 at 15:44
  • @dessert I installed it some minutes ago, but it still doesn't work. My speakers are OK. – Mohammad Kholghi Jun 29 '19 at 15:49
  • @SamuelSantana How to find that? I have a laptop, and I think my speakers are connected to the motherboard directly. – Mohammad Kholghi Jun 29 '19 at 15:50
  • Check the asnwers for this question https://superuser.com/q/22767/701345 and perhaps specially this one https://superuser.com/a/44865/701345 – Samuel Jun 29 '19 at 15:52
  • Do you have the alert sound set on and loud enough, see here: https://askubuntu.com/a/1053142/507051 – dessert Jun 29 '19 at 15:54
  • Is the pcspkr kernel module loaded? Do that with sudo modprobe -v pcspkr and try again. – dessert Jun 29 '19 at 15:58
  • If this still didn’t help please check your BIOS for settings for your internal speakers, especially for one to disable them. – dessert Jun 29 '19 at 16:05
  • Thanks to your all solutions. I found that in alsamixer, I have to enable the loopback device to enable beeping, but when I enable it, my laptop starts a kind of strange noise like a radio. How can I disable that noise without disabling the loopback device? @dessert – Mohammad Kholghi Jul 01 '19 at 16:37
  • 1
    Please add new information directly to your question ([edit]), do not use comments. It’s not a problem at all if your question changes because you gained knowledge, just edit and keep it up to date. – dessert Jul 14 '19 at 20:17

0 Answers0