[arch-general] System-Wide Pulseaudio
Hi everybody, I like to run more than one user in more than one X session at the same time and want to hear the audio from all users together. So i thought it would be nice to have a System-Wide Pulseaudio setup. I try to use this package: https://aur.archlinux.org/packages/pulseaudio-systemd/ and like shown here: http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Syste... I put all users into pulse-access group after installing the pulseaudio-systemd package and reboot, but it will not work. Have anyone a hint for this situation?
On Fri, Sep 6, 2013 at 5:00 PM, Dennis Lange <dennis@lumalab.net> wrote:
Hi everybody,
I like to run more than one user in more than one X session at the same time and want to hear the audio from all users together.
So i thought it would be nice to have a System-Wide Pulseaudio setup.
I try to use this package:
https://aur.archlinux.org/packages/pulseaudio-systemd/
and like shown here:
http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Syste...
I put all users into pulse-access group after installing the pulseaudio-systemd package and reboot, but it will not work.
Have anyone a hint for this situation?
I may give you some help as I already installed some sound servers for Hotels, with numerous outputs and playlists, but what you want is not clear to me. I'm not sure to understand :
I like to run more than one user in more than one X session at the same time and want to hear the audio from all users together.
let's say user1 is connected on session1 with mpd1, user2 on session2 with mpd2. Is it ok ? Then you want to stream the 2 playlists at the same time ?? Sounds weird. Please precise.
I may give you some help as I already installed some sound servers for Hotels, with numerous outputs and playlists, but what you want is not clear to me.
Thanks for taking care!
I'm not sure to understand :
I like to run more than one user in more than one X session at the same time and want to hear the audio from all users together.
let's say user1 is connected on session1 with mpd1, user2 on session2 with mpd2. Is it ok ? Then you want to stream the 2 playlists at the same time ?? Sounds weird.
Please precise.
To be 100% precise I am using only one System and in X session 1 I login as user1 to do more regular stuff like hearing webradio writing mails doing serious stuff. In X session 2 I login as user2 for the fun part. Here I compile and patch my own wine to play some windows games and use Teamspeak to get the swag out there. In X session 3 I login as user3 to do the evil secret stuff. Netfilter is knowing my user3 and does not allow him to talk to the network because of his brilliant evil genius. But I want to hear audio from all users and X sessions no matter which account is the active one. So if I am doing my evil secret stuff, I will hear webradio and the flame war from Teamspeak.
On Fri, Sep 6, 2013 at 7:19 PM, Dennis Lange <dennis@lumalab.net> wrote:
I may give you some help as I already installed some sound servers for Hotels, with numerous outputs and playlists, but what you want is not clear to me.
Thanks for taking care!
I'm not sure to understand :
I like to run more than one user in more than one X session at the same time and want to hear the audio from all users together.
let's say user1 is connected on session1 with mpd1, user2 on session2 with mpd2. Is it ok ? Then you want to stream the 2 playlists at the same time ?? Sounds weird.
Please precise.
To be 100% precise I am using only one System and in X session 1 I login as user1 to do more regular stuff like hearing webradio writing mails doing serious stuff.
In X session 2 I login as user2 for the fun part. Here I compile and patch my own wine to play some windows games and use Teamspeak to get the swag out there.
In X session 3 I login as user3 to do the evil secret stuff. Netfilter is knowing my user3 and does not allow him to talk to the network because of his brilliant evil genius.
But I want to hear audio from all users and X sessions no matter which account is the active one. So if I am doing my evil secret stuff, I will hear webradio and the flame war from Teamspeak.
Ok. Last question : for example, when logged as user2, you want being able to listen playlist of user1 & user3. Am I correct ?
On Fri, Sep 6, 2013 at 8:31 PM, Dennis Lange <dennis@lumalab.net> wrote:
Ok. Last question : for example, when logged as user2, you want being able to listen playlist of user1 & user3. Am I correct ?
Yep!
Please leave the whole conversation so everyone can follow from the beginning. I will get back to you tomorrow with suggestions for the set up.
[2013-09-06 21:37:02 +0200] arnaud gaboury:
Please leave the whole conversation so everyone can follow from the beginning.
The best practice really is to trim your quote down to only the bits that are relevant to your reply. Like I just did. -- Gaetan
To be 100% precise I am using only one System and in X session 1 I login as user1 to do more regular stuff like hearing webradio writing mails doing serious stuff.
In X session 2 I login as user2 for the fun part. Here I compile and patch my own wine to play some windows games and use Teamspeak to get the swag out there.
In X session 3 I login as user3 to do the evil secret stuff. Netfilter is knowing my user3 and does not allow him to talk to the network because of his brilliant evil genius.
But I want to hear audio from all users and X sessions no matter which account is the active one. So if I am doing my evil secret stuff, I will hear webradio and the flame war from Teamspeak.
Do you have mpd installed on your system ? If not, I would first consider it. In your case, it will be the easiest way to share a common music library and settings between all your sessions. https://wiki.archlinux.org/index.php/Mpd
If already installed, please share your mpd configuration.
On 7 sep. 2013, at 11:32, arnaud gaboury <arnaud.gaboury@gmail.com> wrote:
To be 100% precise I am using only one System and in X session 1 I login as user1 to do more regular stuff like hearing webradio writing mails doing serious stuff.
In X session 2 I login as user2 for the fun part. Here I compile and patch my own wine to play some windows games and use Teamspeak to get the swag out there.
In X session 3 I login as user3 to do the evil secret stuff. Netfilter is knowing my user3 and does not allow him to talk to the network because of his brilliant evil genius.
But I want to hear audio from all users and X sessions no matter which account is the active one. So if I am doing my evil secret stuff, I will hear webradio and the flame war from Teamspeak.
Do you have mpd installed on your system ? If not, I would first consider it. In your case, it will be the easiest way to share a common music library and settings between all your sessions. https://wiki.archlinux.org/index.php/Mpd
If already installed, please share your mpd configuration.
I don't think it's for his music only, he wants to hear every sound from his sessions.
Am 07.09.2013 12:30, schrieb Corewolf:
I don't think it's for his music only, he wants to hear every sound from his sessions.
Thats right, but if I get a step foreward without using an external pulse audio server it would be nice! I allready tried to use an external pulse audio server, but latency is far to high for usage with wine-multimedia.
Do you have mpd installed on your system ? If not, I would first consider it. In your case, it will be the easiest way to share a common music library and settings between all your sessions. https://wiki.archlinux.org/index.php/Mpd
If already installed, please share your mpd configuration.
Ok now i have a global Music Player Daemon running. To do this I edit /etc/mpd.conf and unmask and edit the following lines: music_directory "/var/lib/mpd/music" playlist_directory "/var/lib/mpd/playlists" db_file "/var/lib/mpd/mpd.db" log_file "/var/lib/mpd/mpd.log" pid_file "/run/mpd/mpd.pid" user "mpd" bind_to_address "127.0.0.1" port "6600" audio_output { type "pulse" name "pulse audio" server "127.0.0.1" } I also unmask and edit /etc/pulse/default.pa with: load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 Because I do all this for a global mpd I add the daemon with: systemctl enable mpd systemctl start mpd After all I am only able to play webradio on one account. If I change the virtual console with ctrl+alt+f2 audio stops to play and if I start a second X session with another user I am not able to control mpd with a second gmpc or ncmpc. logfile looks like this after switching to another virtual console Sep 07 17:46 : avahi: Service 'Music Player' successfully established. Sep 07 17:47 : client: No such playlist Sep 07 17:47 : output: "pulse audio" [pulse] failed to play: suspended
On Sat, Sep 7, 2013 at 5:54 PM, Dennis Lange <dennis@lumalab.net> wrote:
Do you have mpd installed on your system ? If not, I would first consider it. In your case, it will be the easiest way to share a common music library and settings between all your sessions. https://wiki.archlinux.org/index.php/Mpd
If already installed, please share your mpd configuration.
Ok now i have a global Music Player Daemon running.
Did you installed mpd as per user, as said in the wiki ? It means each user will start/stop its mpd instance.
To do this I edit /etc/mpd.conf and unmask and edit the following lines:
music_directory "/var/lib/mpd/music" playlist_directory "/var/lib/mpd/playlists" db_file "/var/lib/mpd/mpd.db" log_file "/var/lib/mpd/mpd.log" pid_file "/run/mpd/mpd.pid"
Did you uncomment this line : #state_file "/var/lib/mpd/mpdstate" user "mpd"
bind_to_address "127.0.0.1" port "6600" <=== no need.Optional.
audio_output { type "pulse" name "pulse audio" server "127.0.0.1" <=== no need.Optional }
Try to create one mpd.conf in each user home directory. Keep same settings, except for : pid_file "/home/user_name/.mpd/mpd.pid (of course $mkdir ) user "user_name" You can even customize each user playlist, but I guess in your case you want same library
I also unmask and edit /etc/pulse/default.pa with:
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 <=== no need. comment
systemctl enable mpd systemctl start mpd
Do you have a link to mpd.service in /usr/lib/systemd/system/multi-user.target.wants ?
After all I am only able to play webradio on one account.
Sep 07 17:47 : client: No such playlist <=== That's the point. No playlist is found
I would say mpd is not configured as per user, and can't find the playlist. You can play radio (sound is working) but no track, $ cd /var/lib/mpd $ ls -al Check permissions
On 07.09.2013 22:26, arnaud gaboury wrote:
I would say mpd is not configured as per user, and can't find the playlist. You can play radio (sound is working) but no track, $ cd /var/lib/mpd $ ls -al Check permissions
Before I setup global mpd I already setup one per user. The playlist is not my problem. I am interested in playing multiple audiochannels from all runnig users and X sessions simultaneously, regardless which X11 session is in foreground or in background. Some of my programs simlpy use pulseaudio sink and I have no option to say "use this special mpd player".
use pulseaudio sink and I have no option to say "use this special mpd player".
Not sure to fully understand your set up, but what about playing with
Some of my programs simlpy ports? Say user1 ===> mpd conf1 on port 6600 user2 ===> mpd conf2 port 6601 etc Then, in ~/ncmpcpp , play with this line mpd_port = "6600"
If already installed, please share your mpd configuration.
I missed to write that I also add user mpd to audio group: gpasswd -a mpd audio
On 06.09.2013 17:00, Dennis Lange wrote:
Hi everybody,
I like to run more than one user in more than one X session at the same time and want to hear the audio from all users together.
So i thought it would be nice to have a System-Wide Pulseaudio setup.
I try to use this package:
https://aur.archlinux.org/packages/pulseaudio-systemd/
and like shown here:
http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Syste...
I put all users into pulse-access group after installing the pulseaudio-systemd package and reboot, but it will not work.
Have anyone a hint for this situation?
did you start/enable the system wide pulseaudio service? # systemctl enable pulseaudio.service # systemctl start pulseaudio.service -- дамјан
On 07.09.2013 20:58, Damjan wrote:
did you start/enable the system wide pulseaudio service? # systemctl enable pulseaudio.service # systemctl start pulseaudio.service
No, thanks for pointing this out. Ok i enable and starting pulseaudio.service but it change nothing on my situation. # journalctl -b shows that the PulseAudio Server started without any problem Sep 07 21:53:36 rore systemd[1]: Started PulseAudio Sound Server. and if i login with user1 and startx: Sep 07 21:54:43 rore rtkit-daemon[455]: Successfully made thread 559 of process 559 (/usr/bin/pulseaudio) owned by '1000' high priority at nice level -11. and if I switch to virtual console 2 and login with user2 and startx: Sep 07 22:26:12 rore rtkit-daemon[455]: Successfully made thread 1075 of process 1075 (/usr/bin/pulseaudio) owned by '1002' high priority at nice level -11. looks like every user get his own pulseaudio process.
On 07.09.2013 22:42, Dennis Lange wrote:
and if i login with user1 and startx:
Sep 07 21:54:43 rore rtkit-daemon[455]: Successfully made thread 559 of process 559 (/usr/bin/pulseaudio) owned by '1000' high priority at nice level -11.
and if I switch to virtual console 2 and login with user2 and startx:
Sep 07 22:26:12 rore rtkit-daemon[455]: Successfully made thread 1075 of process 1075 (/usr/bin/pulseaudio) owned by '1002' high priority at nice level -11.
looks like every user get his own pulseaudio process.
If I use: # systemctl disable rtkit-daemon.service # systemctl stop rtkit-daemon.service and start a new X session, something automatically reenable and restart rtkit-daemon.service If I find where this happens, it might be possible to say: "only user mpd control pulseaudio"?!
If I use:
# systemctl disable rtkit-daemon.service # systemctl stop rtkit-daemon.service
and start a new X session, something automatically reenable and restart rtkit-daemon.service
If I find where this happens, it might be possible to say: "only user mpd control pulseaudio"?!
Like every time Arch Wiki point me to the right place. I only need to install https://aur.archlinux.org/packages/pulseaudio-systemd/ activate it with systemctl enable pulseaudio.service systemctl start pulseaudio.service add all users to pulse-access group and masking the line /usr/bin/pulseaudio --start "$@" in file /usr/bin/start-pulseaudio-x11 to get System-Wide Pulseaudio running. Thanks for your help!
Op 8 sep. 2013 19:00 schreef "Dennis Lange" <dennis@lumalab.net> het volgende: [...]
If I find where this happens, it might be possible to say: "only user mpd control pulseaudio"?!
Like every time Arch Wiki point me to the right place.
I only need to install
https://aur.archlinux.org/packages/pulseaudio-systemd/
activate it [...] and masking the line /usr/bin/pulseaudio --start "$@" in file /usr/bin/start-pulseaudio-x11
to get System-Wide Pulseaudio running.
Notice that the consequent updates may overwrite that file and thus undo your change... Mvg, Guus
On 08.09.2013 21:36, Guus Snijders wrote:
Notice that the consequent updates may overwrite that file and thus undo your change...
Ok for this and the unneeded pactl usage it is better to change the permission of the whole file: chmod -x /usr/bin/start-pulseaudio-x11 Thanks for your notice.
On 9 Sep 2013 17:17, "Dennis Lange" <dennis@lumalab.net> wrote:
On 08.09.2013 21:36, Guus Snijders wrote:
Notice that the consequent updates may overwrite that file and thus undo your change...
Ok for this and the unneeded pactl usage it is better to change the permission of the whole file:
chmod -x /usr/bin/start-pulseaudio-x11
Thanks for your notice.
Same problem. If the file gets overridden it would still be executable.
On 09.09.2013 11:20, Oon-Ee Ng wrote:
On 9 Sep 2013 17:17, "Dennis Lange" <dennis@lumalab.net> wrote:
On 08.09.2013 21:36, Guus Snijders wrote:
Notice that the consequent updates may overwrite that file and thus undo your change...
Ok for this and the unneeded pactl usage it is better to change the permission of the whole file:
chmod -x /usr/bin/start-pulseaudio-x11
Thanks for your notice.
Same problem. If the file gets overridden it would still be executable.
I have no idea what pacman and the pulseaudio package will do in this situation, but a normal cp will not change the permission.
participants (7)
-
arnaud gaboury
-
Corewolf
-
Damjan
-
Dennis Lange
-
Gaetan Bisson
-
Guus Snijders
-
Oon-Ee Ng