From 4b71d959b4e14a0a204e627d2b7a8b45dfaca347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 14 Jun 2024 15:22:01 +0200 Subject: [PATCH] Run x11vnc with correct SELinux context ... if SELinux is enabled. QubesOS/qubes-issues#9276 --- appvm-scripts/usrbin/qubes-run-x11vnc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/appvm-scripts/usrbin/qubes-run-x11vnc b/appvm-scripts/usrbin/qubes-run-x11vnc index e6594f7b..07bc40ca 100644 --- a/appvm-scripts/usrbin/qubes-run-x11vnc +++ b/appvm-scripts/usrbin/qubes-run-x11vnc @@ -128,6 +128,10 @@ guivm_vnc() { # WIP: Ensure to have the good set of x11vnc options. OPTIONS_VNC="-display :0 -auth /var/run/lightdm/root/:0 -forever" + if [ -e /sys/fs/selinux ] && command -v runcon >/dev/null; then + X11VNC="runcon -t xserver_t $X11VNC" + fi + $X11VNC $OPTIONS_VNC & }