The classic audio diagnostic on Linux/Unix is some beeps occurring and kernel debug text on all virtual terminals when something really horrible has gone wrong.
If you want to make a beep in a linux console, try adding this to your shell scripts. It should trigger the default system "beep" sound. I used to include this in my scripts that ran really long tests or cluster jobs to wake me up and check the results.
Sadly, on many laptops and PCs today, there seems to be no action on the PC speaker at all, but you can configure this system beep code to trigger a sound of your choice from your favorite gui console application.
In Python I believe you can trigger the system 'beep' sound with one of the following:
print("\a") # cross platform
print('\007') # linux only
My gui favorite, Konsole does not make any sound using these standard methods unless you manually configure it to play a file for "Bell in focused session" under Notifications.
Of course this plays a wav/ogg file instead of triggering the PC speaker.
It can be really hard to make a little beep these days, when you consider you may have 4 different sound outputs (one for each display and video card, one or two for the motherboard), application specific audio levels that get set to quiet or muted by default arbitrarily, and then application specific opt-ins needed just to support a little sound that was kind of a failsafe notification in earlier times.
I remembered as I enabled this great setting, that I am usually very quick to turn it OFF because it causes the configured sound to play when you hit backspace at a blank prompt, which I tend to do when I'm thinking of what to type, or clearing lines, I just hit backspace excessively for fun. Unfortunately the bell causes me to get penalized for that, so I will probably disable it again.
If you want to make a beep in a linux console, try adding this to your shell scripts. It should trigger the default system "beep" sound. I used to include this in my scripts that ran really long tests or cluster jobs to wake me up and check the results.
Sadly, on many laptops and PCs today, there seems to be no action on the PC speaker at all, but you can configure this system beep code to trigger a sound of your choice from your favorite gui console application.
In Python I believe you can trigger the system 'beep' sound with one of the following: print("\a") # cross platform print('\007') # linux only
My gui favorite, Konsole does not make any sound using these standard methods unless you manually configure it to play a file for "Bell in focused session" under Notifications. Of course this plays a wav/ogg file instead of triggering the PC speaker.
It can be really hard to make a little beep these days, when you consider you may have 4 different sound outputs (one for each display and video card, one or two for the motherboard), application specific audio levels that get set to quiet or muted by default arbitrarily, and then application specific opt-ins needed just to support a little sound that was kind of a failsafe notification in earlier times.