Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 6th December 2009, 11:19 AM
r0bis Offline
Registered User
 
Join Date: Apr 2009
Location: London, UK
Posts: 9
linuxfedorafirefox
Question Playing sound remotely?

I'd like to ask if I can log on as user remotely and play a sound on the machine to attract the remote machine user's attention? I tried to find info via google but without much success.
The idea is I am in my room, doing something and listening to rhythmbox etc; my brother logs in via ssh/bash and executes a script which plays a sound that I should be able to hear. So I want to set up an easy way for my brother to do this.

I am running FC12 with pulseaudio. SE Linux policies are as out of the box.

I've done some experiments:

1) When I log in remotely as myself I can $ play ./TwistedNerve.wav - levels show on console; I can hear the sound
2) When I log in remotely as another I can $ play ./TwistedNerve.wav - levels show on console; I CAN'T hear the sound

So I suppose the question is - can I provide access to sound devices in my session to the remote user?

Could anyone help, please?
Reply With Quote
  #2  
Old 6th December 2009, 12:29 PM
Gödel's Avatar
Gödel Offline
Registered User
 
Join Date: Jul 2009
Location: London,England
Posts: 1,095
linuxfedorafirefox
It should work. Can you play sounds as the other user when logged in locally? How are you connecting via ssh? If x-forwarding is enabled it will cause issues with the pulseaudio connection, so make sure that's disabled.

Try setting up a plain test user and see if that works (as root):

adduser test
passwd test

then from the remote machine do something like:

ssh ip.of.your.machine -l test
play /usr/share/sounds/purple/login.wav
Reply With Quote
  #3  
Old 6th December 2009, 05:52 PM
r0bis Offline
Registered User
 
Join Date: Apr 2009
Location: London, UK
Posts: 9
linuxfedorafirefox
Thanks,

It is quite interesting:

1) When I log on remotely (from another computer going via no-ip) using my account - the sound plays even I am playing rhythmbox at the time.
2) When I log on remotely using test account - the sound does play - but only if rhythmbox is paused. I can even start playing sound on console, then pause rhythmbox and after a short while the sound would come through

Here is what happens in /var/log/messages
a) when I try to play rhythmbox when the remote test user has already started playing a sound:
pulseaudio[3672]: alsa-sink.c: Error opening PCM device front:0: Device or resource busy
shortly after the sound is finished rhythmbox resumes playing
b) when I try to play a sound as a remote user when rhythmbox is playing
pulseaudio[4003]: main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: /bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
if I pause rhythmbox some 8 seconds later the sound played by the remote user comes through speakers

In other cases there are no errors:
- when I play sound over rhythmbox logged in remotely as myself
- when playback starts for the remote test user - if rhythmbox is not playing

And as one would expect same as for rhythmbox goes also for totem.

I'd appreciate any ideas how the other user account could play sound when the logged on user is using rhythmbox.
Reply With Quote
  #4  
Old 7th December 2009, 09:52 AM
Gödel's Avatar
Gödel Offline
Registered User
 
Join Date: Jul 2009
Location: London,England
Posts: 1,095
linuxfedorafirefox
I've tested this and found problems in a new Fedora 12 install (it worked ok in F12 upgraded from F11).

I get a bluetooth error when I try it (!)

ssh 10.0.0.7 -l test
aplay /usr/share/sounds/purple/login.wav

No audio, and in /var/log/messages I see this:
Quote:
Dec 7 08:46:04 localhost dbus-daemon: Rejected send message, 2 matched rules; type="method_call", sender=":1.92" (uid=501 pid=2876 comm="/usr/bin/pulseaudio) interface="org.bluez.Manager" member="ListAdapters" error name="(unset)" requested_reply=0 destination="org.bluez" (uid=0 pid=1551 comm="/usr/sbin/bluetoothd))
Dec 7 08:46:04 localhost pulseaudio[2876]: bluetooth-util.c: Error from ListAdapters reply: org.freedesktop.DBus.Error.AccessDenied
If I disable bluetooth (from the gnome panel icon), the error goes away and I then get the same dbus error as you, If I use 'ssh -X', the dbus error goes away but I get no sound when I play the file.

This was tested from a livecd F12 session to a fully installed F12 session. I can't even get the delayed audio you report.

There seems to be some bugs here, but I'm not sure which would be the best one to report.

---------- Post added at 09:52 AM CST ---------- Previous post was at 09:20 AM CST ----------

https://bugzilla.redhat.com/show_bug.cgi?id=545001
Reply With Quote
Reply

Tags
bash, remote, sound, ssh

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
F11 stoppe playing sound. WTF ReaperLove Using Fedora 1 11th October 2009 09:23 PM
Sound not playing theAdmiral Using Fedora 18 8th March 2009 07:24 AM
Problem playing sound in FC8 euphgeek Using Fedora 7 21st April 2008 04:00 PM
Sound card detected but no test sound playing Waffle Hardware & Laptops 7 20th December 2005 07:58 PM
After FC3 install, no sound when playing CD. dsharp EOL (End Of Life) Versions 5 20th February 2005 12:57 AM


Current GMT-time: 11:19 (Wednesday, 22-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat