linux - bash里如何使主板蜂鸣(静音依然能响)?
阿神
阿神 2017-04-17 14:45:47
0
1
1367

就像在cmd里运行 echo [Ctrl + G] 或 echo [alt+7] 一样让主板喇叭发出滴滴滴的声音,即使操作系统静音也能发声.
网上说的 echo -e "\007" 和 printf '\7' 之类发声的是功放喇叭而不是主板报警蜂鸣的喇叭啊,, 系统设置静音的时候就不响了...

阿神
阿神

闭关修行中......

reply all(1)
大家讲道理

I haven’t used Linux for a long time. I’ll just tell you based on my impression. This is a very complicated issue:

  1. Some motherboards have a switch in the bios that needs to be turned on.

  2. requires kernel support, module name pcspkr (this condition is generally met, but I prefer to remove this support when using gentoo).

  3. user space support, such as the beep program (this program is sometimes echo -en 'a'>/dev/console), root permissions, etc. The switch settings of console and terminal in X are different.

  4. It seems that not all motherboards have independent pc speakers, some are together with the onboard speakers, and need to be unmuted in alsamixer.

You can google "linux beep", and there are some findings. It seems that ubuntu blacklists the pcspkr module by default.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template