From dbfb1fa7809e496b836702169aaa691f6b184497 Mon Sep 17 00:00:00 2001 From: Ben Grande Date: Thu, 30 May 2024 23:42:53 +0200 Subject: [PATCH] Export dbus address for the notification server Only screenshare script requires as of today, but put it in webcam also for future proof as it doesn't cause any harm. Assigning variable and declaration made separate due to ShellCheck warning SC2155. For: https://github.com/QubesOS/qubes-issues/issues/6426 Fixes: https://github.com/QubesOS/qubes-issues/issues/8457 Fixes: https://github.com/QubesOS/qubes-video-companion/issues/15 --- qubes-rpc/services/qvc.ScreenShare | 4 +++- qubes-rpc/services/qvc.Webcam | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/qubes-rpc/services/qvc.ScreenShare b/qubes-rpc/services/qvc.ScreenShare index 6878f05..ef94493 100755 --- a/qubes-rpc/services/qvc.ScreenShare +++ b/qubes-rpc/services/qvc.ScreenShare @@ -3,5 +3,7 @@ # Copyright (C) 2021 Elliot Killick # Copyright (C) 2021 Demi Marie Obenour # Licensed under the MIT License. See LICENSE file for details. -export DISPLAY=:0 +DISPLAY=:0 +DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(id -u)/bus" +export DISPLAY DBUS_SESSION_BUS_ADDRESS exec python3 -- /usr/share/qubes-video-companion/sender/screenshare.py diff --git a/qubes-rpc/services/qvc.Webcam b/qubes-rpc/services/qvc.Webcam index 7878428..6c0ec85 100755 --- a/qubes-rpc/services/qvc.Webcam +++ b/qubes-rpc/services/qvc.Webcam @@ -3,5 +3,7 @@ # Copyright (C) 2021 Elliot Killick # Copyright (C) 2021 Demi Marie Obenour # Licensed under the MIT License. See LICENSE file for details. -export DISPLAY=:0 +DISPLAY=:0 +DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(id -u)/bus" +export DISPLAY DBUS_SESSION_BUS_ADDRESS exec python3 -- /usr/share/qubes-video-companion/sender/webcam.py ${1:+"$1"}