From owner-freebsd-questions Sat Dec 2 4:10:26 2000 Delivered-To: freebsd-questions@freebsd.org Received: from phoenix.welearn.com.au (phoenix.welearn.com.au [139.130.44.81]) by hub.freebsd.org (Postfix) with ESMTP id 359BD37B400 for ; Sat, 2 Dec 2000 04:10:22 -0800 (PST) Received: (from sue@localhost) by phoenix.welearn.com.au (8.9.3/8.9.3) id XAA65370; Sat, 2 Dec 2000 23:11:57 +1100 (EST) (envelope-from sue) Date: Sat, 2 Dec 2000 23:11:54 +1100 From: Sue Blake To: Kent Stewart Cc: freebsd-questions@FreeBSD.ORG Subject: Re: unpseakable speaker device? Message-ID: <20001202231152.M377@welearn.com.au> References: <20001202222840.K377@welearn.com.au> <3A28E1E2.8D703D3@urx.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <3A28E1E2.8D703D3@urx.com>; from Kent Stewart on Sat, Dec 02, 2000 at 03:49:54AM -0800 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 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