fix: open Flatpak apps in renamed app variants (#1192)

Flatpak starts bwrap with an empty environment, so the bwrap shim lost DROIDDECK_BWRAP_SOCKET and dialled the default package's socket. The session now writes the socket name to /etc/droiddeck/bwrap-socket and the shim reads it when the variable is missing.

Fixes #1092
This commit is contained in:
MaxsTechReview authored and GitHub committed 2026-10-20 09:38:14 -04:00
1 parent 99ab6dd64e
commit 31a6c3d033
4 files changed
+61 -1

No files matched your search

@@ -7,7 +7,21 @@ import socket
import struct
import sys
SOCKET = "\0" + os.environ.get("DROIDDECK_BWRAP_SOCKET", "com.droiddeck.launcher.bwrap")
SOCKET_FILE = "/etc/droiddeck/bwrap-socket"
def socket_name():
name = os.environ.get("DROIDDECK_BWRAP_SOCKET", "")
if not name:
try:
with open(SOCKET_FILE, encoding="utf-8") as f:
name = f.read().strip()
except OSError:
pass
return "\0" + (name or "com.droiddeck.launcher.bwrap")
SOCKET = socket_name()
VERSION = "bubblewrap 0.11.0 (droiddeck)"
NO_ARG = {