There is no speaker on the company's computer, but another alarm is required. When I used Windows many years ago, I used a simple program that I wrote with BCB. Later I switched to Linux and used a simple beep script, which was then run in cron. However, after upgrading to Ubuntu12.04 recently, it was found that it was not ringing & hellip; the script for voice production was very simple :#! /Bin/shforiin $ (seq4) do & nbsp
There is no speaker on the company's computer, but another alarm is required. When I used Windows many years ago, I used a simple program that I wrote with BCB. Later I switched to Linux and used a simple beep script, which was then run in cron. However, after upgrading to Ubuntu 12.04, we found that it was not ringing ......
The voice script is very simple:
#! /Bin/sh
For I in $ (seq 4)
Do
/Usr/bin/beep-f 800-l 125-D 125-r 2
/Bin/sleep 0.5
The tone of the done is: 0.125 seconds at a 0.125Hz frequency, and 0.5 seconds are stopped. After the two times, the system stops for seconds and repeats for four times. Sound: doodle. Doodle. Doodle. Doodle.
Note that the full PATH must be used to call the program in the script, because no user environment exists by default when running in cron, that is, no PATH, generally, a program error cannot be found.
Install beep before using it:
Sudo apt-get install beep, but even so, there is still no sound in Ubuntu 12.04. You can check the settings with xset:
Xset-q | grep bell. Of course, if this is not enabled, you can open it:
Xset B on, but still no sound. I thought that the driver might not have been installed for a long time:
Lsmod | grep pcspkr open/etc/modprobe. d/blacklist. conf, and there is such a line:
Comment on blacklist pcspkr and:
Sudo modprobe pcspkr loads the PC horn driver. Solve the problem.
Speak Out: PC speakers are now widely used in computer chassis, and I still use computer speakers to remove them from the old computer chassis, fortunately, there is still a PC speaker interface on the motherboard-in this era where there is no IDE or PCI, it is really commendable.
Try again: although the LTS version 12.04 is much better than the previous two non-LTS versions, it still has more problems than the previous LTS version 10.04. For example, if you start gvim on the command line, it will be suspended ...... This makes the vim Party feel like it is, and even the emacs party is under attack ......