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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-20-2004, 11:08 AM
|
#1
|
Member
Registered: Feb 2003
Location: Ohio, USA
Distribution: Ubuntu, Debian, CentOS
Posts: 99
Rep:
|
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.
|
|
|
01-20-2004, 05:22 PM
|
#2
|
LQ Guru
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018
Rep:
|
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.
|
|
|
01-20-2004, 05:24 PM
|
#3
|
LQ Guru
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018
Rep:
|
Also, you could compile this C program:
#include <stdio.h>
int main() { printf("\a"); return 0; }
|
|
|
01-21-2004, 01:55 AM
|
#4
|
Member
Registered: Jan 2004
Distribution: Debian and Gentoo
Posts: 39
Rep:
|
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
|
|
|
01-21-2004, 02:43 PM
|
#5
|
Member
Registered: Feb 2003
Location: Ohio, USA
Distribution: Ubuntu, Debian, CentOS
Posts: 99
Original Poster
Rep:
|
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/
|
|
|
03-02-2010, 10:15 PM
|
#6
|
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:
|
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
|
|
|
All times are GMT -5. The time now is 09:54 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|