• Corbin@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 months ago

    I want to run PipeWire as a system user and have multiple login users access it. My current hack is to run it as one login user and then do something like:

    export XDG_RUNTIME_DIR=/run/user/1001
    

    Where 1001 is the user ID. Is there a cleaner approach?

    • comma
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      You could utilize the server/client functionality over the local network instead of using the same process.

      So you could point the other users to the machine’s local address and they would automatically find the Pipewire server. Maybe? I guess? It’s just a theory.

      https://wiki.archlinux.org/title/PipeWire#Sharing_audio_devices_with_computers_on_the_network

      This thread seems to have what you’re looking for.

      https://bbs.archlinux.org/viewtopic.php?id=265878

      According to the thread, its possible to provide system-wide usage by enabling this option at build time:

      -Dsystemd-system-service=enabled
      

      Or it seems like you could share it over the local network by editing the Pipewire config file and making an environment variable. (See post #5.)

      Or you could

      Just add the “player” user to the “audio” group

      according to post #8.

      Note: it seems like Pipewire runs on port 4713. So the server would run on 0.0.0.0:4713, I guess.