You are not logged in.

#1 2011-12-06 06:27:49

vistastar
Member
From: Galaxy
Registered: 2011-12-01
Posts: 13

strange audio problem

I am using cmus to play music on terminal.
But it requires root to play. If I use a non root user, it complains:
Error: Opening audio device: couldn't initialize required output plugin.

The strange thing is, I can play music with mplayer as non root user!

I notice that my system doesn't have a /dev/dsp device, so I installed oss.
But the problem is still there, althgouth /dev/dsp is present.

Last edited by vistastar (2011-12-06 06:35:05)


------ In Arch we believe. --------

Offline

#2 2011-12-06 06:34:38

echo.unity
Member
Registered: 2011-11-14
Posts: 68

Re: strange audio problem

add user to audio?

Offline

#3 2011-12-06 06:35:56

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: strange audio problem

export WHOAMI=$(whoami) && sudo usermod -Ga audio $WHOAMI

Offline

#4 2011-12-06 06:36:09

vistastar
Member
From: Galaxy
Registered: 2011-12-01
Posts: 13

Re: strange audio problem

Yes, I added it using gpasswd. If I don't do this, mplayer will not play music without root.

[alien@Arch~]:)id
uid=1000(alien) gid=1000(alien) groups=1000(alien),92(audio)

Last edited by vistastar (2011-12-06 06:38:22)


------ In Arch we believe. --------

Offline

#5 2011-12-06 06:43:42

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: strange audio problem

vistastar wrote:

Yes, I added it using gpasswd. If I don't do this, mplayer will not play music without root.

[alien@Arch~]:)id
uid=1000(alien) gid=1000(alien) groups=1000(alien),92(audio)

So your user is seriously only in two groups? Mine is in like a dozen. Maybe cmus is trying to reference a plugin that assumes access to disks, video, or whatever.

Offline

#6 2011-12-06 06:48:32

vistastar
Member
From: Galaxy
Registered: 2011-12-01
Posts: 13

Re: strange audio problem

That doesn't matter. I have another Archlinux installed on which the same user have the same groups. I cant play music on that system.
cmus is a terminal based player, no video.


------ In Arch we believe. --------

Offline

#7 2011-12-06 06:49:46

Mavirick
Member
Registered: 2011-12-01
Posts: 62

Re: strange audio problem

Like the beginner guide says for a desktop system you usually want to be in these groups to be able to do many of the tasks as non root.

audio - for tasks involving sound card and related software
lp - for managing printing tasks
optical - for managing tasks pertaining to the optical drive(s)
storage - for managing storage devices
video - for video tasks and hardware acceleration
wheel - for using sudo
games - needed for write permission for games in the games group
power - used with power options (e.g. shutdown with power button)
scanner - for using a scanner

Offline

#8 2011-12-06 06:54:19

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: strange audio problem

vistastar wrote:

That doesn't matter. I have another Archlinux installed on which the same user have the same groups. I cant play music on that system.
cmus is a terminal based player, no video.

Video wasn't the only thing I mentioned; furthermore, I qualified it with a "whatever".

I have trouble seeing how you can expect a normal user to do anything whatsoever when they aren't allowed to do anything.

From my Arch machine:

$ groups | tr ' ' '\n' | grep -v $(whoami)
adm
disk
lp
wheel
ftp
mail
http
games
dbus
network
video
audio
optical
floppy
storage
scanner
power
users

Any one of those missing groups could be screwing you over. Also, just because you run an app from the command line, doesn't mean it doesn't rely on video. I run videos mainly with CLI mplayer.

Last edited by /dev/zero (2011-12-06 06:57:42)

Offline

#9 2011-12-06 07:01:33

vistastar
Member
From: Galaxy
Registered: 2011-12-01
Posts: 13

Re: strange audio problem

I do not need that much. I just need sound. By the way, I am already in sudoers.
since mplayer can play as a non root user, why cmus can't?

Archlinux is a simple light weightdistro which means the "Arch Zen".
I don't want add any thing that I do not need. I believe any one using Arch will agree with me.

My former Archlinux can play music well using cmus. So I am confused about this issue.

Last edited by vistastar (2011-12-06 07:09:24)


------ In Arch we believe. --------

Offline

#10 2011-12-06 09:19:07

PReP
Member
From: Sweden
Registered: 2010-06-13
Posts: 359
Website

Re: strange audio problem

I am not entirerly certain, but comparing my own id's, you seem to not be in the group "users".

And, i would suppose that people using arch would agree on adding youself to standard groups,
following the arch install guide, is a good practice.

Anyways, look into your groups, and/or configuring cmus.

Good luck smile

Last edited by PReP (2011-12-06 09:19:26)


. Main: Intel Core i5 6600k @ 4.4 Ghz, 16 GB DDR4 XMP, Gefore GTX 970 (Gainward Phantom) - Arch Linux 64-Bit
. Server: Intel Core i5 2500k @ 3.9 Ghz, 8 GB DDR2-XMP RAM @ 1600 Mhz, Geforce GTX 570 (Gainward Phantom) - Arch Linux 64-Bit
. Body: Estrogen @ 90%, Testestorone @ 10% (Not scientific just out-of-my-guesstimate-brain)

Offline

#11 2011-12-06 10:20:52

vistastar
Member
From: Galaxy
Registered: 2011-12-01
Posts: 13

Re: strange audio problem

I added all the groups:
$ groups | tr ' ' '\n' | grep -v $(whoami)
adm
disk
lp
wheel
ftp
mail
http
games
dbus
network
video
audio
optical
floppy
storage
scanner
power
users


But it still doesn't work


------ In Arch we believe. --------

Offline

#12 2011-12-06 10:36:13

vistastar
Member
From: Galaxy
Registered: 2011-12-01
Posts: 13

Re: strange audio problem

Hi, every body. Finally, I get off the issue.
It is because the first fail of cmus leaves a socket file on my home directory.
When it starts later it cannot create this file again.
So, I just delete this file. every thing is ok.
Believe the Arch Zen, not even the officail tutorial.


------ In Arch we believe. --------

Offline

#13 2011-12-06 11:05:05

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: strange audio problem

Awesome. Glad you got it working.

Offline

Board footer

Powered by FluxBB