From 7534a970a5535d57d5fa07bd5ed9eb3647cbb7dc Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Thu, 11 Nov 2021 15:48:04 +0000 Subject: [PATCH] run: Support PulseAudio socket path without unix: prefix https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/ServerStrings/ says: > If the string starts with / or unix: the remaining address string is taken as > UNIX socket name. but previously the string was only taken to be a UNIX socket name if it began with "unix:". This is an issue in practice with WSLg which sets $PULSE_SERVER to "/mnt/wslg/PulseServer", without a "unix:" prefix. --- common/flatpak-run.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/flatpak-run.c b/common/flatpak-run.c index fc66672f..7059303e 100644 --- a/common/flatpak-run.c +++ b/common/flatpak-run.c @@ -591,8 +591,11 @@ flatpak_run_parse_pulse_server (const char *value) continue; server = closing + 1; } + if (g_str_has_prefix (server, "unix:")) return g_strdup (server + 5); + if (server[0] == '/') + return g_strdup (server); } return NULL;