You are not logged in.

#1 2011-04-20 22:03:15

lio
Member
From: Montréal, Canada
Registered: 2009-09-13
Posts: 52

[solved] software "beep" not working as non-root user

Hi all,

I use my PC as some kind of a elaborated home server. Being always on and not having my amp turned on all the time I make extended use of the PC speaker beep. I used to use the application named beep to perform sound of different tone and duration triggered by some scripts to know for example if I received a email from work or a personal one, If someone is trying to reach me on IRC, PIDGIN, Skype. If the Internet Connection is down, etc... All of these event triggering a different beep.

But since a little while, the application is not working anymore as a regular user. Only as root. When I try it as my regular user, I get the error message:

julien / $  beep
Could not open /dev/tty0 or /dev/vc/0 for writing
open: No such file or directory

I must admit that I have no idea how to interpret this error message. I would appreciate it if anyone more knowledgeable than me in this could give me a pointer on how to troubleshoot and solve this issue.

many thanks,
Lio

Last edited by lio (2011-04-21 03:49:47)

Offline

#2 2011-04-20 22:11:59

xs
Member
From: San Jose, CA.
Registered: 2011-04-06
Posts: 92

Re: [solved] software "beep" not working as non-root user

Have you added yourself to the audio group?

ie:

xs@ArchBook ~ $ groups xs
lp wheel games video audio optical storage scanner power wireshark users
# gpasswd -a [user] audio

I like pie. Especially with a side of Arch.

Offline

#3 2011-04-20 23:08:11

lio
Member
From: Montréal, Canada
Registered: 2009-09-13
Posts: 52

Re: [solved] software "beep" not working as non-root user

julien / $  groups julien
adm http video audio optical storage power users vboxusers julien

Yes i'm in the audio group already.
Thank you for helping smile

Offline

#4 2011-04-20 23:30:55

tacticalbread
Member
From: Bay Area, CA
Registered: 2011-04-09
Posts: 127
Website

Re: [solved] software "beep" not working as non-root user

heh I have the same problem, and I'm in the audio group as well.


don't save us from the flames

Offline

#5 2011-04-21 00:01:42

xs
Member
From: San Jose, CA.
Registered: 2011-04-06
Posts: 92

Re: [solved] software "beep" not working as non-root user

hmm, check your aliases in /etc/modprobe.d/sound.conf

Here is mine:

alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel

This is from the Alsa wiki:

With Intel Corporation 82801 I (ICH9 Family) HD Audio Controller on laptop, you may need to add this line to modprobe or sound.conf:

options snd-hda-intel model=$model

Where $model is any one of the following (in order of possibility to work, but not merit):

    dell-vostro
    olpc-xo-1_5
    laptop 

Note: It may be necessary to put this "options" line below (after) any "alias" lines about your card. 
And also, [b]if you have problems getting beeps to work (pcspkr)[/b]:

options snd-hda-intel model=$model enable=1 index=0

I'm using alsa/snd_hda_intel

I disabled pcspkr (beeps) in rc.conf cuz I found them annoying. tongue

Hope it helps in some way.


I like pie. Especially with a side of Arch.

Offline

#6 2011-04-21 02:35:05

my0pic
Member
From: Melbourne, Australia
Registered: 2008-05-23
Posts: 206

Re: [solved] software "beep" not working as non-root user

It's because beep is not installed with the suid bit set. Do

sudo chmod 4755 /usr/bin/beep

and it should work as before.
There's more detail in the section titled "IOCTL WACKINESS" in beep manpages.

Offline

#7 2011-04-21 03:02:59

tacticalbread
Member
From: Bay Area, CA
Registered: 2011-04-09
Posts: 127
Website

Re: [solved] software "beep" not working as non-root user

my0pic wrote:

It's because beep is not installed with the suid bit set. Do

sudo chmod 4755 /usr/bin/beep

and it should work as before.
There's more detail in the section titled "IOCTL WACKINESS" in beep manpages.

Well that fixed it for me. :D


don't save us from the flames

Offline

#8 2011-04-21 03:47:24

lio
Member
From: Montréal, Canada
Registered: 2009-09-13
Posts: 52

Re: [solved] software "beep" not working as non-root user

tacticalbread wrote:
my0pic wrote:

It's because beep is not installed with the suid bit set. Do

sudo chmod 4755 /usr/bin/beep

and it should work as before.
There's more detail in the section titled "IOCTL WACKINESS" in beep manpages.

Well that fixed it for me. big_smile

Wow fixed it for me too big_smile

Thank you so much !!!

Offline

Board footer

Powered by FluxBB