[GH-ISSUE #2035] Firejail 0.9.54 and pulseaudio 12: Edge case with no sound #1373

Closed
opened 2026-05-05 07:57:57 -06:00 by gitea-mirror · 15 comments
Owner

Originally created by @lknix on GitHub (Jul 9, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/2035

I have an interesting problem (an edge case) where sound doesn't work if I switch to another user which has access to X11:

# If I use primary user (who started X11) sound works:
$ firejail  --dns=8.8.8.8  firefox --no-remote --private-window

# Now I grant X11 access to user "web"
$ xhost +SI:localuser:web
$ sudo -u web -i
$ whoami
web
$ groups
users web
# Sound works without firejail:
$ firefox --no-remote --private-window
# Sound doesn't work inside firejail:
$ firejail --debug --dns=8.8.8.8  firefox --no-remote --private-window
...
[Child 88, MediaPlayback #3] WARNING: 7fe4c6d8c040 OpenCubeb() failed to init cubeb: file /build/firefox/src/mozilla-unified/dom/media/AudioStream.cpp, line 390
[Child 88, MediaPlayback #3] WARNING: Decoder=7fe4cbfe62e0 [OnMediaSinkAudioError]: file /build/firefox/src/mozilla-unified/dom/media/MediaDecoderStateMachine.cpp, line 3716
...
# After playing around and exploring suggestions in git issues, this fixed the problem:
$ firejail --ignore=whitelist --dns=8.8.8.8  firefox --no-remote --private-window
$ uname -a 
Linux arch 4.17.4-1-ARCH #1 SMP PREEMPT Tue Jul 3 15:45:09 UTC 2018 x86_64 GNU/Linux
$

Any ideas why it doesn't work out of the box? Also, I'm not completely sure how --ignore=whitelist helps. Afaik it ignores all the whiltelist lines in the profile. Should I bisect the whitelists to find out exactly which one is problematic?

Originally created by @lknix on GitHub (Jul 9, 2018). Original GitHub issue: https://github.com/netblue30/firejail/issues/2035 I have an interesting problem (an edge case) where sound doesn't work if I switch to another user which has access to X11: ```sh # If I use primary user (who started X11) sound works: $ firejail --dns=8.8.8.8 firefox --no-remote --private-window # Now I grant X11 access to user "web" $ xhost +SI:localuser:web $ sudo -u web -i $ whoami web $ groups users web # Sound works without firejail: $ firefox --no-remote --private-window # Sound doesn't work inside firejail: $ firejail --debug --dns=8.8.8.8 firefox --no-remote --private-window ... [Child 88, MediaPlayback #3] WARNING: 7fe4c6d8c040 OpenCubeb() failed to init cubeb: file /build/firefox/src/mozilla-unified/dom/media/AudioStream.cpp, line 390 [Child 88, MediaPlayback #3] WARNING: Decoder=7fe4cbfe62e0 [OnMediaSinkAudioError]: file /build/firefox/src/mozilla-unified/dom/media/MediaDecoderStateMachine.cpp, line 3716 ... # After playing around and exploring suggestions in git issues, this fixed the problem: $ firejail --ignore=whitelist --dns=8.8.8.8 firefox --no-remote --private-window ``` ``` $ uname -a Linux arch 4.17.4-1-ARCH #1 SMP PREEMPT Tue Jul 3 15:45:09 UTC 2018 x86_64 GNU/Linux $ ``` Any ideas why it doesn't work out of the box? Also, I'm not completely sure how `--ignore=whitelist` helps. Afaik it ignores all the `whiltelist` lines in the profile. Should I bisect the `whitelist`s to find out exactly which one is problematic?
gitea-mirror 2026-05-05 07:57:57 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@chiraag-nataraj commented on GitHub (Jul 9, 2018):

Should I bisect the whitelists to find out exactly which one is problematic?

Yes please! That would be very helpful 🙂 I suspect it's something to do with the files in /var (so you can try commenting out include /etc/firejail/whitelist-var-common.inc as a first guess).

<!-- gh-comment-id:403456198 --> @chiraag-nataraj commented on GitHub (Jul 9, 2018): > Should I bisect the whitelists to find out exactly which one is problematic? Yes please! That would be very helpful :slightly_smiling_face: I suspect it's something to do with the files in `/var` (so you can try commenting out `include /etc/firejail/whitelist-var-common.inc` as a first guess).
Author
Owner

@lknix commented on GitHub (Jul 9, 2018):

OK, here are the results. I had to comment out the following:

/etc/firejail/firefox-common.profile:

# whitelist ${DOWNLOADS}
# whitelist ${HOME}/.pki
# include /etc/firejail/whitelist-common.inc
# include /etc/firejail/whitelist-var-common.inc

/etc/firejail/firefox.profile:

# whitelist ${HOME}/.cache/mozilla/firefox
# whitelist ${HOME}/.mozilla

And all of them need to be commented out - if any one of them is left, then there's no sound. I've double checked.

<!-- gh-comment-id:403472488 --> @lknix commented on GitHub (Jul 9, 2018): OK, here are the results. I had to comment out the following: `/etc/firejail/firefox-common.profile`: ```sh # whitelist ${DOWNLOADS} # whitelist ${HOME}/.pki # include /etc/firejail/whitelist-common.inc # include /etc/firejail/whitelist-var-common.inc ``` `/etc/firejail/firefox.profile`: ```sh # whitelist ${HOME}/.cache/mozilla/firefox # whitelist ${HOME}/.mozilla ``` And all of them need to be commented out - if any one of them is left, then there's no sound. I've double checked.
Author
Owner

@chiraag-nataraj commented on GitHub (Jul 9, 2018):

Is your pulse socket in ~/.config/pulse by any chance? You may need to whitelist that directory as well. Try whitelisting ~/.config/pulse as well as ~/.pulse (if you have that directory). That may let you uncomment the home directory whitelists (including include /etc/firejail/whitelist-common.inc). As for the whitelist-var-common portion, see if adding a whitelist /var/run/user (and uncommenting the include whitelist-var-common.inc) helps.

<!-- gh-comment-id:403474356 --> @chiraag-nataraj commented on GitHub (Jul 9, 2018): Is your `pulse` socket in `~/.config/pulse` by any chance? You may need to whitelist that directory as well. Try whitelisting `~/.config/pulse` as well as `~/.pulse` (if you have that directory). That may let you uncomment the home directory whitelists (including `include /etc/firejail/whitelist-common.inc`). As for the `whitelist-var-common` portion, see if adding a `whitelist /var/run/user` (and uncommenting the `include whitelist-var-common.inc`) helps.
Author
Owner

@lknix commented on GitHub (Jul 9, 2018):

@chiraag-nataraj thanks for your prompt replies. Unfortunately, none of the suggestions worked:

  1. whitelist ${HOME}/.config/pulse -> /etc/firejail/globals.local:
$ ls -l .config/pulse/
total 60
-rw-r--r-- 1 web web 20480 Nov 23  2015 32b2691a21e24e70a687f8220642cf49-card-database.tdb
-rw-r--r-- 1 web web    10 Jan  8  2016 32b2691a21e24e70a687f8220642cf49-default-sink
-rw-r--r-- 1 web web    18 Jan  8  2016 32b2691a21e24e70a687f8220642cf49-default-source
-rw-r--r-- 1 web web  8192 Nov 23  2015 32b2691a21e24e70a687f8220642cf49-device-volumes.tdb
lrwxrwxrwx 1 web web    23 Jan  8  2016 32b2691a21e24e70a687f8220642cf49-runtime -> /tmp/pulse-squcZDzrhZJU
-rw-r--r-- 1 web web 16384 Jan  8  2016 32b2691a21e24e70a687f8220642cf49-stream-volumes.tdb
-rw-r--r-- 1 web web  1233 Jul  9 12:24 client.conf
-rw------- 1 web web   256 Nov 23  2015 cookie

There's no sound if I comment out any of the ${HOME} or ${DOWNLOADS} lines. I don't have ~/.pulse directory.

  1. whitelist /var/run/user -> /etc/firejail/globals.local:
$ ls /var/run/user/
1000

firejail doesn't want to run:

$ firejail --dns=8.8.8.8  firefox --no-remote --private-window
...
Error: invalid whitelist path /var/run/user
Error: proc 16345 cannot sync with peer: unexpected EOF
Peer 16346 unexpectedly exited with status 1
<!-- gh-comment-id:403480915 --> @lknix commented on GitHub (Jul 9, 2018): @chiraag-nataraj thanks for your prompt replies. Unfortunately, none of the suggestions worked: 1. `whitelist ${HOME}/.config/pulse` -> `/etc/firejail/globals.local`: ``` $ ls -l .config/pulse/ total 60 -rw-r--r-- 1 web web 20480 Nov 23 2015 32b2691a21e24e70a687f8220642cf49-card-database.tdb -rw-r--r-- 1 web web 10 Jan 8 2016 32b2691a21e24e70a687f8220642cf49-default-sink -rw-r--r-- 1 web web 18 Jan 8 2016 32b2691a21e24e70a687f8220642cf49-default-source -rw-r--r-- 1 web web 8192 Nov 23 2015 32b2691a21e24e70a687f8220642cf49-device-volumes.tdb lrwxrwxrwx 1 web web 23 Jan 8 2016 32b2691a21e24e70a687f8220642cf49-runtime -> /tmp/pulse-squcZDzrhZJU -rw-r--r-- 1 web web 16384 Jan 8 2016 32b2691a21e24e70a687f8220642cf49-stream-volumes.tdb -rw-r--r-- 1 web web 1233 Jul 9 12:24 client.conf -rw------- 1 web web 256 Nov 23 2015 cookie ``` There's no sound if I comment out any of the `${HOME}` or `${DOWNLOADS}` lines. I don't have `~/.pulse` directory. 2. `whitelist /var/run/user` -> `/etc/firejail/globals.local`: ``` $ ls /var/run/user/ 1000 ``` `firejail` doesn't want to run: ``` $ firejail --dns=8.8.8.8 firefox --no-remote --private-window ... Error: invalid whitelist path /var/run/user Error: proc 16345 cannot sync with peer: unexpected EOF Peer 16346 unexpectedly exited with status 1 ```
Author
Owner

@lknix commented on GitHub (Jul 9, 2018):

Just to reiterate: firejail works fine if used by the same user who started X11:

$ ps ux | grep xinit
luka      6872  0.0  0.0  16040  1036 tty1     S+   08:46   0:00 xinit /home/luka/.xinitrc -- /etc/X11/xinit/xserverrc :0 vt1 -keeptty -auth /tmp/serverauth.qV48Zjg6Ch
# This works w/o any problems.
$ firejail --dns=8.8.8.8  firefox --no-remote --private-window

It only stops working if I switch to another user which has granted access to X11 (for GUI apps).

<!-- gh-comment-id:403488099 --> @lknix commented on GitHub (Jul 9, 2018): Just to reiterate: `firejail` works fine if used by the same user who started X11: ``` $ ps ux | grep xinit luka 6872 0.0 0.0 16040 1036 tty1 S+ 08:46 0:00 xinit /home/luka/.xinitrc -- /etc/X11/xinit/xserverrc :0 vt1 -keeptty -auth /tmp/serverauth.qV48Zjg6Ch # This works w/o any problems. $ firejail --dns=8.8.8.8 firefox --no-remote --private-window ``` It only stops working if I switch to another user which has granted access to X11 (for GUI apps).
Author
Owner

@lknix commented on GitHub (Jul 9, 2018):

OK, the same issue with mpv:

  1. If I run it from the same user who started X11 it works:
$ whoami
luka
# This works:
$ firejail --whitelist=`pwd`/Downloads mpv Downloads/example.mkv
Reading profile /etc/firejail/mpv.profile
Reading profile /etc/firejail/globals.local
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-devel.inc
Reading profile /etc/firejail/disable-interpreters.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/whitelist-var-common.inc
Parent pid 14780, child pid 14781
95 programs installed in 77.46 ms
Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set.
Warning: /sbin directory link was not blacklisted
Warning: /usr/sbin directory link was not blacklisted
Blacklist violations are logged to syslog
Child process initialized in 154.37 ms
Playing: ...
 (+) Video --vid=1 (*) (h264 1280x720 23.976fps)
 (+) Audio --aid=1 (*) (ac3 6ch 48000Hz)
AO: [pulse] 48000Hz 5.1(side) 6ch float
VO: [gpu] 1280x720 yuv420p
AV: 00:00:01 / 00:42:34 (0%) A-V:  0.000

  1. If I switch to user web, everything works outside of firejail, but trying to run inside it there's no sound:
$ firejail --whitelist=`pwd`/Downloads mpv Downloads/example.mkv
Reading profile /etc/firejail/mpv.profile
Reading profile /etc/firejail/globals.local
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-devel.inc
Reading profile /etc/firejail/disable-interpreters.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/whitelist-var-common.inc
Parent pid 21399, child pid 21400
95 programs installed in 70.10 ms
Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set.
Warning: cleaning all supplementary groups
Warning: cleaning all supplementary groups
Warning: cleaning all supplementary groups
Warning: /sbin directory link was not blacklisted
Warning: /usr/sbin directory link was not blacklisted
Blacklist violations are logged to syslog
Child process initialized in 151.95 ms
Playing: ...
 (+) Video --vid=1 (*) (h264 342x240 30.000fps)
 (+) Audio --aid=1 --alang=und (*) (aac 2ch 44100Hz)
[ao/alsa] Playback open error: Permission denied
[ao/oss] Can't open audio device /dev/dsp: No such file or directory
[ao/jack] cannot open server
[ao] Failed to initialize audio driver 'jack'
Could not open/initialize audio device -> no sound.
Audio: no audio
VO: [gpu] 342x240 yuv420p
V: 00:00:02 / 00:19:20 (0%)
<!-- gh-comment-id:403491416 --> @lknix commented on GitHub (Jul 9, 2018): OK, the same issue with `mpv`: 1. If I run it from the same user who started X11 it works: ``` $ whoami luka # This works: $ firejail --whitelist=`pwd`/Downloads mpv Downloads/example.mkv Reading profile /etc/firejail/mpv.profile Reading profile /etc/firejail/globals.local Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-devel.inc Reading profile /etc/firejail/disable-interpreters.inc Reading profile /etc/firejail/disable-passwdmgr.inc Reading profile /etc/firejail/disable-programs.inc Reading profile /etc/firejail/whitelist-var-common.inc Parent pid 14780, child pid 14781 95 programs installed in 77.46 ms Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set. Warning: /sbin directory link was not blacklisted Warning: /usr/sbin directory link was not blacklisted Blacklist violations are logged to syslog Child process initialized in 154.37 ms Playing: ... (+) Video --vid=1 (*) (h264 1280x720 23.976fps) (+) Audio --aid=1 (*) (ac3 6ch 48000Hz) AO: [pulse] 48000Hz 5.1(side) 6ch float VO: [gpu] 1280x720 yuv420p AV: 00:00:01 / 00:42:34 (0%) A-V: 0.000 ``` 2. If I switch to user `web`, everything works outside of `firejail`, but trying to run inside it there's no sound: ``` $ firejail --whitelist=`pwd`/Downloads mpv Downloads/example.mkv Reading profile /etc/firejail/mpv.profile Reading profile /etc/firejail/globals.local Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-devel.inc Reading profile /etc/firejail/disable-interpreters.inc Reading profile /etc/firejail/disable-passwdmgr.inc Reading profile /etc/firejail/disable-programs.inc Reading profile /etc/firejail/whitelist-var-common.inc Parent pid 21399, child pid 21400 95 programs installed in 70.10 ms Warning: An abstract unix socket for session D-BUS might still be available. Use --net or remove unix from --protocol set. Warning: cleaning all supplementary groups Warning: cleaning all supplementary groups Warning: cleaning all supplementary groups Warning: /sbin directory link was not blacklisted Warning: /usr/sbin directory link was not blacklisted Blacklist violations are logged to syslog Child process initialized in 151.95 ms Playing: ... (+) Video --vid=1 (*) (h264 342x240 30.000fps) (+) Audio --aid=1 --alang=und (*) (aac 2ch 44100Hz) [ao/alsa] Playback open error: Permission denied [ao/oss] Can't open audio device /dev/dsp: No such file or directory [ao/jack] cannot open server [ao] Failed to initialize audio driver 'jack' Could not open/initialize audio device -> no sound. Audio: no audio VO: [gpu] 342x240 yuv420p V: 00:00:02 / 00:19:20 (0%) ```
Author
Owner

@chiraag-nataraj commented on GitHub (Jul 9, 2018):

Okay, let me try this in a virtual machine (don't want to pollute my main computer with random additional users xD) and get back.

<!-- gh-comment-id:403494763 --> @chiraag-nataraj commented on GitHub (Jul 9, 2018): Okay, let me try this in a virtual machine (don't want to pollute my main computer with random additional users xD) and get back.
Author
Owner

@lknix commented on GitHub (Jul 9, 2018):

@chiraag-nataraj maybe this is helpful:

  • in order to use pulseaudio with multiple users (and not running it system-wide) I use module-native-protocol-tcp which binds at 127.0.0.1:4713. So, basically pulseaudio is started by the same user as X11 (luka).
  • when I switch to user web its ~.config/pulse/clienf.conf has default-server = 127.0.0.1. So web connects to existing pulseaudio.
<!-- gh-comment-id:403519814 --> @lknix commented on GitHub (Jul 9, 2018): @chiraag-nataraj maybe this is helpful: - in order to use `pulseaudio` with multiple users (and not running it system-wide) I use `module-native-protocol-tcp` which binds at `127.0.0.1:4713`. So, basically `pulseaudio` is started by the same user as X11 (`luka`). - when I switch to user `web` its `~.config/pulse/clienf.conf` has `default-server = 127.0.0.1`. So `web` connects to existing `pulseaudio`.
Author
Owner

@chiraag-nataraj commented on GitHub (Jul 11, 2018):

This is very interesting. I just played around with this, following the exact same steps you used, and sound worked for me. I created a new user (dummy), added it to the X11 ACL, sudo'd in to the user, and ran firefox both with and without firejail. I got sound both times.

I also don't have a ~/.config/pulse/ directory in the dummy user's home directory. pulse is started by my main user (chiraag) and binds to the TCP socket. And apparently pulse just...discovers the TCP socket I suppose? Because I didn't configure pulse at all for user dummy.

<!-- gh-comment-id:404264427 --> @chiraag-nataraj commented on GitHub (Jul 11, 2018): This is _very_ interesting. I just played around with this, following the exact same steps you used, and sound worked for me. I created a new user (dummy), added it to the X11 ACL, `sudo`'d in to the user, and ran firefox both with and without firejail. I got sound both times. I also don't have a `~/.config/pulse/` directory in the `dummy` user's home directory. `pulse` is started by my main user (`chiraag`) and binds to the TCP socket. And apparently `pulse` just...discovers the TCP socket I suppose? Because I didn't configure `pulse` at all for user `dummy`.
Author
Owner

@chiraag-nataraj commented on GitHub (Jul 11, 2018):

I also verified that pulse isn't spawning a new instance for dummy - that is, it's reusing the existing instance (using the TCP socket, no doubt). So now we come to: Why is it that mine worked and yours failed? 😜

<!-- gh-comment-id:404266363 --> @chiraag-nataraj commented on GitHub (Jul 11, 2018): I also verified that `pulse` isn't spawning a new instance for `dummy` - that is, it's reusing the existing instance (using the TCP socket, no doubt). So now we come to: Why is it that mine worked and yours failed? :stuck_out_tongue_winking_eye:
Author
Owner

@chiraag-nataraj commented on GitHub (Jul 15, 2018):

@lknix Do you think there are any other details that are relevant? I'll try putting a pulse.conf in the other user's home folder to see if that changes anything, but otherwise, our setups are identical.

<!-- gh-comment-id:405114070 --> @chiraag-nataraj commented on GitHub (Jul 15, 2018): @lknix Do you think there are any other details that are relevant? I'll try putting a `pulse.conf` in the other user's home folder to see if that changes anything, but otherwise, our setups are identical.
Author
Owner

@lknix commented on GitHub (Jul 24, 2018):

This is interesting. ~/.config/pulse/client.conf for my web user:

# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

## Configuration file for PulseAudio clients. See pulse-client.conf(5) for
## more information. Default values are commented out.  Use either ; or # for
## commenting.

; default-sink =
; default-source =
; default-server =
; default-dbus-server =

autospawn = no
; autospawn = yes
; daemon-binary = /usr/bin/pulseaudio
; extra-arguments = --log-target=syslog

; cookie-file =

; enable-shm = yes
; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB

; auto-connect-localhost = no
; auto-connect-display = no

enable-shm = no

# Unix sockets don't work for some reason so we use TCP
# default-server = unix:/tmp/pulse-socket
default-server = 127.0.0.1

There are also these files in the ~/.config/pulse/:

[web@arch ~]$ ls -l ~/.config/pulse/
total 60
-rw-r--r-- 1 web web 20480 Nov 23  2015 32b2691a21e24e70a687f8220642cf49-card-database.tdb
-rw-r--r-- 1 web web    10 Jan  8  2016 32b2691a21e24e70a687f8220642cf49-default-sink
-rw-r--r-- 1 web web    18 Jan  8  2016 32b2691a21e24e70a687f8220642cf49-default-source
-rw-r--r-- 1 web web  8192 Nov 23  2015 32b2691a21e24e70a687f8220642cf49-device-volumes.tdb
lrwxrwxrwx 1 web web    23 Jan  8  2016 32b2691a21e24e70a687f8220642cf49-runtime -> /tmp/pulse-squcZDzrhZJU
-rw-r--r-- 1 web web 16384 Jan  8  2016 32b2691a21e24e70a687f8220642cf49-stream-volumes.tdb
-rw-r--r-- 1 web web  1359 Jul  9 17:19 client.conf
-rw------- 1 web web   256 Nov 23  2015 cookie

It's interesting that your setup just works using TCP socket (default fallback?). If I change my setup to use unix socket it doesn't work for some reason, but it does with TCP.

This is puzzling - I'm not sure what else to check. Any ideas?

<!-- gh-comment-id:407361450 --> @lknix commented on GitHub (Jul 24, 2018): This is interesting. `~/.config/pulse/client.conf` for my `web` user: ``` # This file is part of PulseAudio. # # PulseAudio is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # PulseAudio is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with PulseAudio; if not, see <http://www.gnu.org/licenses/>. ## Configuration file for PulseAudio clients. See pulse-client.conf(5) for ## more information. Default values are commented out. Use either ; or # for ## commenting. ; default-sink = ; default-source = ; default-server = ; default-dbus-server = autospawn = no ; autospawn = yes ; daemon-binary = /usr/bin/pulseaudio ; extra-arguments = --log-target=syslog ; cookie-file = ; enable-shm = yes ; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB ; auto-connect-localhost = no ; auto-connect-display = no enable-shm = no # Unix sockets don't work for some reason so we use TCP # default-server = unix:/tmp/pulse-socket default-server = 127.0.0.1 ``` There are also these files in the `~/.config/pulse/`: ``` [web@arch ~]$ ls -l ~/.config/pulse/ total 60 -rw-r--r-- 1 web web 20480 Nov 23 2015 32b2691a21e24e70a687f8220642cf49-card-database.tdb -rw-r--r-- 1 web web 10 Jan 8 2016 32b2691a21e24e70a687f8220642cf49-default-sink -rw-r--r-- 1 web web 18 Jan 8 2016 32b2691a21e24e70a687f8220642cf49-default-source -rw-r--r-- 1 web web 8192 Nov 23 2015 32b2691a21e24e70a687f8220642cf49-device-volumes.tdb lrwxrwxrwx 1 web web 23 Jan 8 2016 32b2691a21e24e70a687f8220642cf49-runtime -> /tmp/pulse-squcZDzrhZJU -rw-r--r-- 1 web web 16384 Jan 8 2016 32b2691a21e24e70a687f8220642cf49-stream-volumes.tdb -rw-r--r-- 1 web web 1359 Jul 9 17:19 client.conf -rw------- 1 web web 256 Nov 23 2015 cookie ``` It's interesting that your setup just works using TCP socket (default fallback?). If I change my setup to use unix socket it doesn't work for some reason, but it does with TCP. This is puzzling - I'm not sure what else to check. Any ideas?
Author
Owner

@chiraag-nataraj commented on GitHub (Jul 24, 2018):

I think the unix socket doesn't work because of ownership issues? Like, in my system, systemd starts the pulseaudio service with a socket in /run/user//pulse, which is clearly not accessible to other users. The TCP socket gets around that.

If TCP works fine for you now, it seems that this issue is resolved?

<!-- gh-comment-id:407362373 --> @chiraag-nataraj commented on GitHub (Jul 24, 2018): I think the unix socket doesn't work because of ownership issues? Like, in my system, systemd starts the pulseaudio service with a socket in /run/user/<uid>/pulse, which is clearly not accessible to other users. The TCP socket gets around that. If TCP works fine for you now, it seems that this issue is resolved?
Author
Owner

@chiraag-nataraj commented on GitHub (Aug 18, 2018):

@lknix I got the impression that the issue is resolved, so I'm going to close this now. If I got the wrong impression, please feel free to reopen!

<!-- gh-comment-id:414055193 --> @chiraag-nataraj commented on GitHub (Aug 18, 2018): @lknix I got the impression that the issue is resolved, so I'm going to close this now. If I got the wrong impression, please feel free to reopen!
Author
Owner

@disposableone commented on GitHub (Dec 19, 2020):

Please reopen because you got the wrong impression.
Pulseaudio can create sockets wherever. I set it to create a socket in /tmp/. I was getting issues that seemed like permission issues but then I added the unix socket to the 'default-server' field in .config/pulse/client.conf for the user, and sounds in firejail started working. Before it was giving the 'couldn't connect to the bus' error, making it look like it was a permission issue.

<!-- gh-comment-id:748493983 --> @disposableone commented on GitHub (Dec 19, 2020): Please reopen because you got the wrong impression. Pulseaudio can create sockets wherever. I set it to create a socket in /tmp/. I was getting issues that seemed like permission issues but then I added the unix socket to the 'default-server' field in .config/pulse/client.conf for the user, and sounds in firejail started working. Before it was giving the 'couldn't connect to the bus' error, making it look like it was a permission issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1373
No description provided.