From a8892481cbd9b080acf99eb7fbaea2ed987be4b4 Mon Sep 17 00:00:00 2001 From: William Miranda Date: Wed, 21 Oct 2026 00:29:50 +0100 Subject: [PATCH 1/2] fix: preserve IPC namespace for XWayland compatibility Replace bwrap --unshare-all with explicit namespace isolation to preserve shared IPC access between Wine and XWayland. Fixes MIT-SHM X_ShmPutImage BadValue errors that prevented Cortex Control from launching on KDE Plasma Wayland. Keep user, PID, UTS, network, and cgroup isolation. --- scripts/desktop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/desktop.py b/scripts/desktop.py index d0f2b16..e3ba8c9 100644 --- a/scripts/desktop.py +++ b/scripts/desktop.py @@ -270,7 +270,7 @@ def run_wine(wine_args=None, disconnected=False, config=None): def execute_wine(runtime, app, state, files, node, wine_args): - cmd = ['bwrap', '--unshare-all', '--die-with-parent', '--new-session', '--clearenv', + cmd = ['bwrap', '--unshare-user', '--unshare-pid', '--unshare-uts', '--unshare-cgroup-try', '--unshare-net', '--die-with-parent', '--new-session', '--clearenv', '--ro-bind', '/usr', '/usr', '--symlink', 'usr/bin', '/bin', '--symlink', 'usr/lib', '/lib', '--symlink', 'usr/lib64', '/lib64', '--ro-bind', '/etc', '/etc', '--ro-bind', '/sys', '/sys', From 368d38ce23c163a4355f2c255c8beed3416b1aea Mon Sep 17 00:00:00 2001 From: William Miranda Date: Wed, 21 Oct 2026 00:38:20 +0100 Subject: [PATCH 2/2] fix: allow host network access for Cortex Control --- scripts/desktop.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/desktop.py b/scripts/desktop.py index e3ba8c9..05ef807 100644 --- a/scripts/desktop.py +++ b/scripts/desktop.py @@ -270,7 +270,7 @@ def run_wine(wine_args=None, disconnected=False, config=None): def execute_wine(runtime, app, state, files, node, wine_args): - cmd = ['bwrap', '--unshare-user', '--unshare-pid', '--unshare-uts', '--unshare-cgroup-try', '--unshare-net', '--die-with-parent', '--new-session', '--clearenv', + cmd = ['bwrap', '--unshare-user', '--unshare-pid', '--unshare-uts', '--unshare-cgroup-try', '--die-with-parent', '--new-session', '--clearenv', '--ro-bind', '/usr', '/usr', '--symlink', 'usr/bin', '/bin', '--symlink', 'usr/lib', '/lib', '--symlink', 'usr/lib64', '/lib64', '--ro-bind', '/etc', '/etc', '--ro-bind', '/sys', '/sys',