Date: Sat, 2 Dec 2000 23:11:54 +1100 From: Sue Blake <sue@welearn.com.au> To: Kent Stewart <kstewart@urx.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: unpseakable speaker device? Message-ID: <20001202231152.M377@welearn.com.au> In-Reply-To: <3A28E1E2.8D703D3@urx.com>; from Kent Stewart on Sat, Dec 02, 2000 at 03:49:54AM -0800 References: <20001202222840.K377@welearn.com.au> <3A28E1E2.8D703D3@urx.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Dec 02, 2000 at 03:49:54AM -0800, Kent Stewart wrote: > > > Sue Blake wrote: > > > > Is there some way to test, silently from a shell script, > > whether the currently running kernel has PC speaker support? > > In an xterm window, did you try pressing <ctl>g. That uses the > internal speak on two of my systems. Thanks for the tip, Kent, but it want to do it silently because I won't be there. Also I think you can get a beep without the speaker device being built into the kernel, but I know you can't play tunes on the speaker without it. The script goes like this: 1. test (secretly) that PC speaker device is accessible by the user if not privileged, provide instructions for changing permissions and exit the program if the user is allowed to write to /dev/speaker, continue with test 2 2. test for kernel PC speaker support if unsupported, provide instructions for building it into the kernel and exit the program if supported, run the rest of the program as if nothing had been going on, without mentioning the testing at all I can do both of these tests OK, but there might be a better way. The second of the two tests is the one that I think I could improve. -- Regards, -*Sue*- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001202231152.M377>