LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-20-2004, 11:08 AM   #1
vrillusions
Member
 
Registered: Feb 2003
Location: Ohio, USA
Distribution: Ubuntu, Debian, CentOS
Posts: 99

Rep: Reputation: 25
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.
 
Old 01-20-2004, 05:22 PM   #2
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
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.
 
Old 01-20-2004, 05:24 PM   #3
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
Also, you could compile this C program:

#include <stdio.h>

int main() { printf("\a"); return 0; }
 
Old 01-21-2004, 01:55 AM   #4
TheBlackUnicorn
Member
 
Registered: Jan 2004
Distribution: Debian and Gentoo
Posts: 39

Rep: Reputation: 15
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 : http://johnath.com/beep/beep-1.2.2.tar.gz
 
Old 01-21-2004, 02:43 PM   #5
vrillusions
Member
 
Registered: Feb 2003
Location: Ohio, USA
Distribution: Ubuntu, Debian, CentOS
Posts: 99

Original Poster
Rep: Reputation: 25
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 http://freshmeat.net/projects/beep/
 
Old 03-02-2010, 10:15 PM   #6
bendib
Member
 
Registered: Feb 2009
Location: I'm the rat in your couch.
Distribution: Fedora on servers, Debian on PPC Mac, custom source-built for desktops
Posts: 174

Rep: Reputation: 40
For those of you who wanted to compile that C program but didn't, click here to download it for x86 Linux: http://geekinsnthings.homelinux.org/beep.bin
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
obsd: constant pc speaker beep with gigabyte board Fonk *BSD 0 09-26-2005 03:07 AM
How do I beep PC speaker without a console? PFudd Linux - Hardware 1 08-30-2005 06:52 PM
Incredibly annoying pc speaker beep on error in MySql in Windows XP nazdrowie Programming 2 07-15-2005 01:26 AM
Make computer beep mfo6463 Linux - Newbie 3 04-01-2004 05:29 AM
[SOLVED] If I make it beep it reboots. Louis_Carole Linux - Newbie 4 02-06-2004 07:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration