Messages in this thread |  | | From | Kevin Lentin <> | | | Subject | Re: /proc tunable speaker | | Date | Fri, 10 Jan 1997 17:28:17 +1100 (EST) |
Aaron Tiensivu Wrote ...
>
> Real simple and to the point.. enable/disable speaker output
> Against 2.1.15 but should work in 2.1.20 too.
>
> echo 0 >/proc/sys/kernel/speaker
>
> Turns off speaker.
>
> Anything above 0 turns it on.
A nice quick way of turning it on and off. BUT the VT's already support
tunable bells so sending
ESC[10;X]
ESC[11;Y]
(NB those codes are worked out based on me manually tracing through the
code in console.c . I think I got it right)
Will set the bell pitch to X and the duration to Y (0 sets to default). So
you can switch all the bells off with a little script that sends 0 for X or
Y to each of the vc's in turn. I admit, that's a bit annoying and it does
lose some state but it is an alternative.
Your way will maintain the settings and works across all VC's.
I think there might be a setterm program around that does those escapes for
you. (anybody know where it lives if it exists?)
--
[======================================================================]
[ Kevin Lentin Email: K.Lentin@cs.monash.edu.au ]
[ finger kevinl@fangorn.cs.monash.edu.au for PGP public key block. ]
[ KeyId: 06808EED FingerPrint: 6024308DE1F84314 811B511DBA6FD596 ]
[======================================================================]
|  |