-   Linux - Hardware (
-   -   How to make pc speaker beep in slackware (

vrillusions 01-20-2004 11:08 AM

How to make pc speaker beep in slackware
I have a computer that I'm going to leave over at a friends house as a backup server. It won't have a monitor or keyboard hooked up, just power and network cable, so I wanted to throw in at the end of the shutdown script a beep that indicates the computer has been shutdown completely and is ok to power off since it doen't automatically turn off. How can I do this? I know there is a pc speaker driver out there that lets you play wav files and stuff, but I don't want that just something that I can send like send 1000 hz tone for 250 milliseconds then 2000 hz for 250 milliseconds, etc. Would have to write a program to do that, if so, how would I do that? I know a little bit of C++, but not that much.

wapcaplet 01-20-2004 05:22 PM

I think curses comes with some routines to make the speaker beep, but that may be just for programming.

There's this small program that may do what you're looking for.

wapcaplet 01-20-2004 05:24 PM

Also, you could compile this C program:

#include <stdio.h>

int main() { printf("\a"); return 0; }

TheBlackUnicorn 01-21-2004 01:55 AM

Also, there is a little program called beep in the Debian distribution. It allows you to set parameters such as number of repetitions, pitch, and length. I don't know if it's in slackware.

If it isn't, you can download it here :

vrillusions 01-21-2004 02:43 PM

That beep link works great. It's not included with slackware, but I was able to compile and run it without any problems, although I did have to set the suid sticky. Now I can play with all the tones I can make :)

as a side note, wonder how come I never got any notification of replies, I have the email notification checked by default (only reason I saw the replies was because I was going to post a link to that beep program :) ). Ohh well. For the heck of it, the freshmeat page is :)

bendib 03-02-2010 10:15 PM

For those of you who wanted to compile that C program but didn't, click here to download it for x86 Linux:

All times are GMT -5. The time now is 09:54 PM.