Bug 194034 - Xmms can only be used by root. Mortal user receives "Couldn't open audio"
Xmms can only be used by root. Mortal user receives "Couldn't open audio"
Product: Fedora
Classification: Fedora
Component: xmms (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: John (J5) Palmieri
Depends On:
  Show dependency treegraph
Reported: 2006-06-05 02:45 EDT by Greg Morgan
Modified: 2013-03-13 00:50 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-06-05 11:41:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Greg Morgan 2006-06-05 02:45:59 EDT
Description of problem:
Perhaps this is not an xmms issue at all but a configuration problem.  I am not
sure where to file the issue with so I'll start here.  Note that If I use the
computer directly, I do not have this problem.  So is this a HAL and friends
issue for remote users?

I used gdmsetup, system > admin > Login screen to configure remote X access. 
The target FC5 computer is attached to the Stereo.  I use tsclient, Applications
> Internet > Terminal Services Client to access this remote computer.  While in
the tsclient screen on the remote computer, I start xmms as mortal user.  The
application fails with the "Couldn't open audio" error message in the title of
the dialog box.  The full error is "Plese check that: Your soundcare is
configured properly; You have the correct output plugin selected; No other
program is blocking the soundcard."  High on the list was
http://www.xmms.org/faq.php#Running5 .  root can use the device remotely ok.  A
mortal user has problems.  I performed the chmod commands on the pcm and mixer
device since root could use the device and a mortal user cannot.  I also tried
oss, alsa and ess in the output plugin.  All had similar issues.  Note Selinux
is not activatd.  Note xmms works find when I am at the keyboard.

Version-Release number of selected component (if applicable):
tsclient is 0.140
xmms is 1.2.10

How reproducible:
So far it looks consistent

Steps to Reproduce:
1.configure xdmcp
2.configure a tsclient.
3.Access xmms in the tsclient while on the remote computer
Actual results:
xmms fails to play for a mortal user while the root user succeeds in playing songs.

Expected results:
The remote use of xmms would play for the mortal user tool just like it does
when the mortal user is directly using xmms at the keyboard.

Additional info:
Comment 1 Greg Morgan 2006-06-05 03:29:16 EDT
Key messages when xmms is used in a gnnome terminal window.

Root session.....
Creating link /root/.kde/socket-sherekhan.
Created link from "/root/.kde/socket-sherekhan" to "/tmp/ksocket-root"
XS[src/xmms-sid.c:xs_init:216]: xs_init()

I removed these socket files in the mortal user's account because the mortal
user has an NFS mounted home directory.  This still not solve the problem.

mortal user's session log
XS[src/xmms-sid.c:xs_init:216]: xs_init()
XS[src/xs_config.c:xs_init_configuration:164]: initializing configuration ...
XS[src/xs_config.c:xs_read_configuration:265]: loading from config-file ...
XS[src/xs_config.c:xs_read_configuration:320]: OK
XS[src/xmms-sid.c:xs_reinit:163]: initializing emulator engine #1...
XS[src/xmms-sid.c:xs_reinit:177]: init#1: OK, 1
XS[src/xmms-sid.c:xs_reinit:189]: init#2: OK, 0
XS[src/xmms-sid.c:xs_init:226]: OK

** WARNING **: alsa_get_mixer(): Attaching to mixer hw:0 failed: No such device
ALSA lib confmisc.c:672:(snd_func_card_driver) cannot find card '0'
ALSA lib conf.c:3492:(_snd_config_evaluate) function snd_func_card_driver
returned error: No such device
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:3492:(_snd_config_evaluate) function snd_func_concat returned
error: No such device
ALSA lib confmisc.c:1072:(snd_func_refer) error evaluating name
ALSA lib conf.c:3492:(_snd_config_evaluate) function snd_func_refer returned
error: No such device
ALSA lib conf.c:3961:(snd_config_expand) Evaluate error: No such device
ALSA lib pcm.c:2099:(snd_pcm_open_noupdate) Unknown PCM default
Comment 2 John (J5) Palmieri 2006-06-05 11:41:35 EDT
Does the mortal user have console status on the remote computer?  i.e. does 
/var/run/console/mortal file exist?

What it looks like to me is you are logging into a box using XDMCP which does
not give you console access (neither does logging in via ssh).  Devices are only
given to users who are given console status (i.e. logged in physically at the
computer).  This is correct security behaviour.

You most likely need to create a udev rule that assigns the audio device to a
group and add your user to that group.

Note You need to log in before you can comment on or make changes to this bug.