View Full Version : [Pyton] System beep not working
mhoy06
June 2nd, 2009, 12:04 PM
I'm using python 2.6 and Ubuntu. The following code isn't work either in the interpreter or run from a file:
import sys
sys.stdout.write('\a')
It's the weirdest thing because I recall it working the other day. Since that day I haven't done much to my system besides adding a new user and installing languages for that account. I'm the only one using this computer. I've checked in SYSTEM>PREFERENCES>SOUND and it seems fine. Correct me if I'm wrong but that beep is not controlled by the settings right?
Anyway I must be missing something really simple. Any help appreciated.
s.fox
June 2nd, 2009, 12:08 PM
Hi,
Try this:
print "\a"
Hope this helps
-Ash R
mhoy06
June 2nd, 2009, 12:29 PM
Hi,
Try this:
print "\a"
Hope this helps
-Ash R
Forgot to mention that I tried that too. No luck. Thanks for the reply though.
unutbu
June 2nd, 2009, 12:37 PM
Perhaps check
xset q | grep bell
If you see
bell percent: 0 bell pitch: 400 bell duration: 100
Then turn the bell on with
xset b on
mhoy06
June 2nd, 2009, 12:46 PM
Perhaps check
xset q | grep bell
If you see
bell percent: 0 bell pitch: 400 bell duration: 100
Then turn the bell on with
xset b on
Nice. Didn't know about that. Anyway here is my xset q | grep bell:
bell percent: 50 bell pitch: 400 bell duration: 100
So that tells me that the bell is on. Tried this anyway:
xset b on
Still no beep.
Edit:
Also tried xset b off then xset b on as well.
unutbu
June 2nd, 2009, 01:15 PM
When you type
lsmod | grep pcspkr
do you see
pcspkr 10624 0
?
and when you open a gnome-terminal and type Ctrl-g do you hear the beep?
mhoy06
June 2nd, 2009, 01:18 PM
I see:
pcspkr 10496 0
and no when I type control g I hear no beep
unutbu
June 2nd, 2009, 01:30 PM
Hm, sorry, I'm stumped. :confused:
mhoy06
June 2nd, 2009, 01:33 PM
Hm, sorry, I'm stumped. :confused:
NP, I appreciate the effort. Hey at least I learned something about how to grep for pc speakers and verify that the bell is on :)
sujoy
June 2nd, 2009, 01:46 PM
i have a pc beep channel in alsamixer for my desktop, not there in laptop though. so if you have such a channel, check if its muted or not.
mhoy06
June 2nd, 2009, 01:52 PM
Thanks, checked for it and it wasn't there. It's a laptop, might be why.
I tried to turn them all on, but most of them wouldn't turn on. The ones that did didn't solve the problem.
bsund
June 2nd, 2009, 07:23 PM
My laptop beeps in it's speakers, you made sure that you got volume on? :)
And if I have headphones it beeps in them etc.
Check in your bios if there is any option about it..
Strange problem though :)
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.