🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.os.linux.debian
Article #42793

Re: Dlaczego nie mogę słuchać muzy "w tle" na konsoli?

#42793
From: Pan Net
Date: Thu, 14 Nov 2024 15:35
53 lines
2968 bytes
Dnia 13.11.2024 validator <altvalidator@pm.me> napisał/a:
> Dnia 10.11.24 | 13:29 Qliver Sieciowiec <q-net@MacBookPro10.QLIVER> napisał/a:
>> Ale gdy z konta usera z danymi/dokumentami/plikami odpalę muzykę (np.
>> mp3blaster czy cplay-ng) i przełączę się na inną konsolę z zalogowanym
>> innym userem, to momentalnie przerywa odtwarzanie muzyki... wznawia, gdy
>> wrócę do konsoli, gdzie jest odpalony program muzyczny. W ramach tego
>> samego usera, z innej konsoli czy pod screen'em, nie ma problemu.
>
> a spróbuj jeszcze z https://github.com/jonsafari/mocp
> "u mnie działa" :D

Wbrew pozorom problem istnieje, i nie jest łatwy w rozwiązaniu (jeśli
trzeba wszystkiego szukać samemu i drążyć temat).

Poniżej to, co znalazłem w sieci na ten temat:


What do I got to do to stop user switching on Linux from stopping sound?
If I play some audio under user user1, I don't want it to stop when I
switch to an unused virtual console or to user2 (via Menu->Log
Out->Switch User).

The reason why the sound turns off is that Pulseaudio is started on each
login with this user's privileges and the system does not allow users to
listen to other users audio.  Solution :

1) 
Add all users that should be able play back to the pulse-access group
adduser <user-name> pulse-access
2)
Create /etc/systemd/system/pulseaudio.service with the following content:
[Service]
Type=simple
PIDFile=/var/run/pulse/pid
ExecStart=/usr/bin/pulseaudio --daemonize=yes --system=yes \
--disallow-module-loading=yes --disallow-exit=yes
[Install]
WantedBy=multi-user.target
3)
Enable this new systemd service so that it is started on boot:
systemctl enable pulseaudio
4)
Be aware that this configuration is
-     less secure (e.g. other users can listen to your microphone)
-     sound output will not automatically switch to and from headphones anymore
-     might prevent Bluetooth from working.

https://unix.stackexchange.com/questions/382601/how-to-prevent-sound-mute-when-switching-user


-- 
Qliver, w wersji q-net
W przypadku problemów dzwoń 997!
Technical Details
Message-ID: <slrnvjc655.28ch.q-net@QLIVER.home>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!.POSTED.2a02:a318:e0e7:bd80:de64:d047:d2ae:fdb5!not-for-mail
References: <slrnvj1daa.fkt.q-net@MacBookPro10.QLIVER> <94d9786e3602a7eea237424dd7f7679306c20823@i2pn2.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!.POSTED.2a02:a318:e0e7:bd80:de64:d047:d2ae:fdb5!not-for-mail
From: Pan Net <q-net@QLIVER.home>
Newsgroups: pl.comp.os.linux.debian
Subject: Re: Dlaczego nie mogę słuchać muzy "w
 tle" na konsoli?
Date: Thu, 14 Nov 2024 15:35:01 -0000 (UTC)
Organization: ICM, Uniwersytet Warszawski
Message-ID: <slrnvjc655.28ch.q-net@QLIVER.home>
References: <slrnvj1daa.fkt.q-net@MacBookPro10.QLIVER> <94d9786e3602a7eea237424dd7f7679306c20823@i2pn2.org>
Mime-Version: 1.0
Injection-Date: Thu, 14 Nov 2024 15:35:01 -0000 (UTC)
Injection-Info: news.icm.edu.pl; posting-host="2a02:a318:e0e7:bd80:de64:d047:d2ae:fdb5"; logging-data="1929231"; mail-complaints-to="usenet@news.icm.edu.pl"
User-Agent: slrn/1.0.3 (Linux)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit