$ sudo python
Python 2.5.1 (r251:54863, Aug 17 2007, 18:40:36)
[GCC 4.1.3 20070812 (prerelease) (Ubuntu 4.1.2-15ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> KIOCSOUND = 0x4B2F
>>>
>>> import fcntl, sys
>>>
>>> import time
>>> while(True):
... fd = open("/dev/console")
... fcntl.ioctl(fd, KIOCSOUND, 500)
... fd.close()
... time.sleep(5)
...
sound will actually work. There must be a way to use /sys or /proc to do the same thing, but this does work. (of course you can put the program in a file and run it, but I felt more comfortable typing in something that was going to need sudo access).
I have found a (bizarre) workaround. According to http:// www.klabs. be/~fpiat/ linux/debian/ Etch_on_ Thinkpad_ T61.html , there's something funky in the driver, but if you do this
$ sudo python dev/console" )
Python 2.5.1 (r251:54863, Aug 17 2007, 18:40:36)
[GCC 4.1.3 20070812 (prerelease) (Ubuntu 4.1.2-15ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> KIOCSOUND = 0x4B2F
>>>
>>> import fcntl, sys
>>>
>>> import time
>>> while(True):
... fd = open("/
... fcntl.ioctl(fd, KIOCSOUND, 500)
... fd.close()
... time.sleep(5)
...
sound will actually work. There must be a way to use /sys or /proc to do the same thing, but this does work. (of course you can put the program in a file and run it, but I felt more comfortable typing in something that was going to need sudo access).