From 4dae9a8d82a6f7035dccdae71aa10615cce7b2ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 4 Aug 2020 15:11:49 +0200 Subject: [PATCH] guivm: clean qrexec-service related environment in GUI session Xephyr server and the GUI (xfce) session running inside is started now as a qrexec service. Do not let qrexec-related environment variables to propagate to the actual session, to not confuse some utilities. This specifically affects qvm-sync-appmenus which behaves differently when called as a qrexec service. But could affect also qrexec-fork-server (a service could see gui-session related variables if for any reason qrexec-fork-server fails to set them to the actual call values). --- appvm-scripts/usrbin/qubes-start-xephyr | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/appvm-scripts/usrbin/qubes-start-xephyr b/appvm-scripts/usrbin/qubes-start-xephyr index f60f0f1a..7911f01b 100644 --- a/appvm-scripts/usrbin/qubes-start-xephyr +++ b/appvm-scripts/usrbin/qubes-start-xephyr @@ -5,6 +5,15 @@ if [ $(whoami) == "root" ]; then exit 1 fi +# do not let child processes believe they are running as qrexec service +# directly +unset QREXEC_REMOTE_DOMAIN +unset QREXEC_SERVICE_FULL_NAME +unset QREXEC_SERVICE_ARGUMENT +unset QREXEC_REQUESTED_TARGET +unset QREXEC_REQUESTED_TARGET_TYPE +unset QREXEC_AGENT_PID + DISPLAY_XORG=:1 DISPLAY_XEPHYR=:0