From d5850a591879989080c0d983ca0092ae1d22d020 Mon Sep 17 00:00:00 2001 From: Benoit Date: Thu, 28 May 2026 13:52:27 +0200 Subject: [PATCH] fix: utiliser chemin absolu pour pactl dans PipeWireBackend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - /usr/bin/pactl au lieu de 'pactl' pour éviter problèmes PATH - Correction dans getDevices(), getDefaultInputDevice(), getDefaultOutputDevice() - Fix 'pactl: not found' malgré installation de pulseaudio-utils --- server/bridge/backends/PipeWireBackend.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/server/bridge/backends/PipeWireBackend.js b/server/bridge/backends/PipeWireBackend.js index 4fa680c..3e36d8d 100644 --- a/server/bridge/backends/PipeWireBackend.js +++ b/server/bridge/backends/PipeWireBackend.js @@ -74,8 +74,10 @@ export class PipeWireBackend extends EventEmitter { try { // Utilise pactl (compatible PipeWire) pour lister les devices - const sourcesOutput = execSync('pactl list sources short', { encoding: 'utf8' }); - const sinksOutput = execSync('pactl list sinks short', { encoding: 'utf8' }); + // Chemin absolu pour éviter les problèmes de PATH avec /bin/sh + const pactlCmd = '/usr/bin/pactl'; + const sourcesOutput = execSync(`${pactlCmd} list sources short`, { encoding: 'utf8' }); + const sinksOutput = execSync(`${pactlCmd} list sinks short`, { encoding: 'utf8' }); const devices = []; @@ -126,7 +128,8 @@ export class PipeWireBackend extends EventEmitter { */ static getDefaultInputDevice() { try { - const output = execSync('pactl get-default-source', { encoding: 'utf8' }); + const pactlCmd = '/usr/bin/pactl'; + const output = execSync(`${pactlCmd} get-default-source`, { encoding: 'utf8' }); const defaultName = output.trim(); const devices = this.getDevices(); @@ -144,7 +147,8 @@ export class PipeWireBackend extends EventEmitter { */ static getDefaultOutputDevice() { try { - const output = execSync('pactl get-default-sink', { encoding: 'utf8' }); + const pactlCmd = '/usr/bin/pactl'; + const output = execSync(`${pactlCmd} get-default-sink`, { encoding: 'utf8' }); const defaultName = output.trim(); const devices = this.getDevices();