Docker container (KASMvnc + obsidian) not able to play sound : bdus error

77 views Asked by At

I’m facing an issue with a docker image (https://github.com/sytone/obsidian-remote) based on KASMvnc that displays obsidian.
It works correctly except for playing sounds.
I have some mp4 files in my obsidian vault, that can be played but the sound is not working.

It uses pulseaudio.
My docker host has audio support working.
It looks like it is related to dbus.



Here is my config.




docker-compose.yml

FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbullseye

# Update and install extra packages.
RUN echo "**** install packages ****" && \
    apt-get update && \
    apt-get install -y --no-install-recommends curl libgtk-3-0 libnotify4 libatspi2.0-0 libsecret-1-0 libnss3 desktop-file-utils && \
    apt-get autoclean && rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/*

# Set version label
ARG OBSIDIAN_VERSION=1.5.3

# Download and install Obsidian
RUN echo "**** download obsidian ****" && \
    curl --location --output obsidian.deb "https://github.com/obsidianmd/obsidian-releases/releases/download/v${OBSIDIAN_VERSION}/obsidian_${OBSIDIAN_VERSION}_amd64.deb" && \
    dpkg -i obsidian.deb

# Environment variables
ENV CUSTOM_PORT="8080" \
    CUSTOM_HTTPS_PORT="8443" \
    CUSTOM_USER="" \
    PASSWORD="" \
    SUBFOLDER="" \
    TITLE="Obsidian v${OBSIDIAN_VERSION}" \
    FM_HOME="/vaults"

# Add local files
COPY root/ /

EXPOSE 8080 8443
VOLUME ["/config","/vaults"]

# Define a healthcheck
HEALTHCHECK CMD curl --fail http://localhost:8080/ || exit 1

docker-compose.yml


See a few commented lines that I tried without luck

version: "3"

services:
  obsidian:
    image: obsidian-remote:2024.02.12 
    build:
      dockerfile: ./Dockerfile
    container_name: obsidian-remote
    restart: unless-stopped
    ports:
      - 8088:8080
      - 8443:8443
    volumes:
      - ./vaults:/vaults
      - ./config:/config
      #- /run/dbus/system_bus_socket:/run/dbus/system_bus_socket
      #- /tmp/pulseaudio.socket:/tmp/pulseaudio.socket
      #- /tmp/pulseaudio.client.conf:/etc/pulse/client.conf
      #- /run/user/1002/bus:/run/user/1002/bus
    environment:
      - PUID=1002
      - PGID=100
      - TZ=Europe/Paris
      - DOCKER_MODS=linuxserver/mods:universal-git
      - CUSTOM_PORT=8080
      - CUSTOM_HTTPS_PORT=8443
      - CUSTOM_USER=admin
      - PASSWORD=obsidian
      - SUBFOLDER=/
     # - PULSE_SERVER=unix:/tmp/pulseaudio.socket
     # - PULSE_COOKIE=/tmp/pulseaudio.cookie
     # - DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1002/bus
     # - DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket
    # devices:
     # - /dev/snd:/dev/snd

Errors when executing and when playing a video file with sound

obsidian-remote | [961:0223/173013.413639:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")



This error repeats during the mp4 playback

Anyone has any clue on how to solve this audio playback from a docker container ?

Thank you for helping.

0

There are 0 answers