diff --git a/qubes-rpc/services/qvc.ScreenShare b/qubes-rpc/services/qvc.ScreenShare index 6878f05..b67aa42 100755 --- a/qubes-rpc/services/qvc.ScreenShare +++ b/qubes-rpc/services/qvc.ScreenShare @@ -1,7 +1,9 @@ #!/bin/sh -- - # Copyright (C) 2021 Elliot Killick # Copyright (C) 2021 Demi Marie Obenour # Licensed under the MIT License. See LICENSE file for details. -export DISPLAY=:0 +set -eu +true "${XDG_RUNTIME_DIR:="/run/user/$(id -u)"}" +true "${DBUS_SESSION_BUS_ADDRESS:="unix:path=${XDG_RUNTIME_DIR}/bus"}" +export DISPLAY=:0 XDG_RUNTIME_DIR 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..8f66f6f 100755 --- a/qubes-rpc/services/qvc.Webcam +++ b/qubes-rpc/services/qvc.Webcam @@ -1,7 +1,9 @@ #!/bin/sh -- - # Copyright (C) 2021 Elliot Killick # Copyright (C) 2021 Demi Marie Obenour # Licensed under the MIT License. See LICENSE file for details. -export DISPLAY=:0 -exec python3 -- /usr/share/qubes-video-companion/sender/webcam.py ${1:+"$1"} +set -eu +true "${XDG_RUNTIME_DIR:="/run/user/$(id -u)"}" +true "${DBUS_SESSION_BUS_ADDRESS:="unix:path=${XDG_RUNTIME_DIR}/bus"}" +export DISPLAY=:0 XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS +exec python3 -- /usr/share/qubes-video-companion/sender/webcam.py "${1:+"$1"}"