Beep on Linux in C

Please look at the standard linux beep source code.
http://www.johnath.com/beep/beep.c

It uses KIOCSOUND ioctl to “beep”, but you don’t need superuser privileges to make it play.
I have configured it to be readable and executable by users on the “beep” group.

So my standard user with UID 1000 is in the group with GID 501 (i called it “beep”).
Next to this I had to chmod 4750 /usr/bin/beep and now I’m able to play beeps (in the range 20-20000Hz) without asking for superuser privileges.

Leave a Comment